aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-01-27 18:29:21 +0000
committerSimon Tatham <anakin@pobox.com>2022-01-27 18:29:21 +0000
commit07029044b7f525f2aa930b28ee809d1834e44920 (patch)
treef55d58a6b26f5e495a6145c496cb74ccb3bf0d60
parent534384e5de95e8d4d0f60277befc922b6796b705 (diff)
downloadpuzzles-07029044b7f525f2aa930b28ee809d1834e44920.zip
puzzles-07029044b7f525f2aa930b28ee809d1834e44920.tar.gz
puzzles-07029044b7f525f2aa930b28ee809d1834e44920.tar.bz2
puzzles-07029044b7f525f2aa930b28ee809d1834e44920.tar.xz
Mosaic: fix uninitialised field in dup_game().
not_completed_clues wasn't being copied from the previous game state, and was left uninitialised, so that its value was indeterminate.
-rw-r--r--mosaic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mosaic.c b/mosaic.c
index 7ded969..f72e8ca 100644
--- a/mosaic.c
+++ b/mosaic.c
@@ -907,6 +907,7 @@ static game_state *dup_game(const game_state *state)
game_state *ret = snew(game_state);
ret->cheating = state->cheating;
+ ret->not_completed_clues = state->not_completed_clues;
ret->width = state->width;
ret->height = state->height;
ret->cells_contents = snewn(state->height * state->width, char);