aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2014-10-29 21:41:38 +0000
committerSimon Tatham <anakin@pobox.com>2014-10-29 21:41:38 +0000
commit4a8edc65bbe906093787645b98122c7750ae83e8 (patch)
tree0e01c022fe4d2d80f92e155ef1d7b08e728a4537
parent3017455259f955e6257381e449419fea780a40f2 (diff)
downloadpuzzles-4a8edc65bbe906093787645b98122c7750ae83e8.zip
puzzles-4a8edc65bbe906093787645b98122c7750ae83e8.tar.gz
puzzles-4a8edc65bbe906093787645b98122c7750ae83e8.tar.bz2
puzzles-4a8edc65bbe906093787645b98122c7750ae83e8.tar.xz
Fix error highlighting of closed subgraphs in Bridges.
When I did the recent rewrite of the Bridges drawing code, I spotted and replicated the code in game_redraw that set G_WARN at redraw time on an island with unsatisfiable clues, but didn't spot the code elsewhere (e.g. map_group_check) which might have set G_WARN ahead of time, so I failed to check for that. As a result, if you join some islands together into a subgraph with no further room for expansion (e.g. connect a pair of 1s together, or a pair of 2s with a double bridge) then all the bridges in that subgraph light up red but the islands themselves forget to. Trivial one-line fix.
-rw-r--r--bridges.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bridges.c b/bridges.c
index f5478af..23a95f5 100644
--- a/bridges.c
+++ b/bridges.c
@@ -2967,7 +2967,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds,
if (is_drag_src && (is == is_drag_src ||
(is_drag_dst && is == is_drag_dst)))
idata |= DI_COL_SELECTED;
- else if (island_impossible(is, v & G_MARK))
+ else if (island_impossible(is, v & G_MARK) || (v & G_WARN))
idata |= DI_COL_WARNING;
else
idata |= DI_COL_NORMAL;