aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2016-12-16 18:33:10 +0000
committerSimon Tatham <anakin@pobox.com>2016-12-16 18:33:10 +0000
commit0b348877e22930bd76c6f00d8d634f7669cd1acb (patch)
tree27f3eef1b4002ac81df4e648f33075a8dcc82ada
parentcf6e4e272c2aa3477f149eb75ffe0436e1a8a2b0 (diff)
downloadpuzzles-0b348877e22930bd76c6f00d8d634f7669cd1acb.zip
puzzles-0b348877e22930bd76c6f00d8d634f7669cd1acb.tar.gz
puzzles-0b348877e22930bd76c6f00d8d634f7669cd1acb.tar.bz2
puzzles-0b348877e22930bd76c6f00d8d634f7669cd1acb.tar.xz
Fix missing error highlights (+ array underrun!) in Pearl.
I was accidentally re-checking the value of component_state[comp] after resetting comp to the special value -1, which caused a failure to highlight stray path-shaped components if they existed in addition to a large loop component. (Plus, of course, it's just illegal no matter what visible behaviour it does or doesn't cause in practice.) Fixed by adjusting the code to more closely match the version in Loopy (I wonder how I managed to add two pieces of code in commit b31155b73 without noticing this difference between them).
-rw-r--r--pearl.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/pearl.c b/pearl.c
index c289ec6..4e4290e 100644
--- a/pearl.c
+++ b/pearl.c
@@ -1610,8 +1610,6 @@ static void check_completion(game_state *state, int mark)
*/
for (i = 0; i < w*h; i++) {
int comp = dsf_canonify(dsf, i);
- if (component_state[comp] == COMP_PATH)
- comp = -1; /* part of the 'all paths' quasi-component */
if ((component_state[comp] == COMP_PATH &&
-1 != largest_comp) ||
(component_state[comp] == COMP_LOOP &&