chiark / gitweb /
Fix false-positive completion detection in X Solo.
authorSimon Tatham <anakin@pobox.com>
Sun, 25 Mar 2018 21:27:38 +0000 (22:27 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 25 Mar 2018 21:27:38 +0000 (22:27 +0100)
commitc6e0161dd475415316ed66dc82794d68e52f0025
tree824da4cae6af225fed36eaaff896fea8dad3c252
parent2adf0052d66eae88c7a5e55e67fe16e13f7018b5
Fix false-positive completion detection in X Solo.

Spotted by Michael Quevillon. After checking the set of digits
appearing in one of the two main grid diagonals, we weren't clearing
the used[] array before using it to check the same thing about the
other diagonal. So if the first diagonal we check has one of
everything, then the second will be misidentified as correct (for the
purposes of game-completion detection, although not error
highlighting) even if it doesn't have one of everything.
solo.c