problems icon indicating copy to clipboard operation
problems copied to clipboard

Runoff check50 bug

Open Nerosegnofic opened this issue 2 years ago • 1 comments

I've written code for the function find_min that is illogical and prone to segmentation faults and yet check50 still lets it pass. Capture

Nerosegnofic avatar Sep 06 '22 04:09 Nerosegnofic

the code outputs 15 for checks "find_min returns minimum number of votes for candidate" and "find_min ignores eliminated candidates". the code essentially outputs the first candidate it can find which has more votes than the following candidate. the output of this is 15

the former searches for "1" in the output while the latter searches for "5". since you can find "1" in "15", and "5" in "15", both checks pass.

ghost avatar Sep 06 '22 05:09 ghost