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.
This commit is contained in:
Simon Tatham
2022-01-27 18:29:21 +00:00
parent 534384e5de
commit 07029044b7

View File

@ -907,6 +907,7 @@ static game_state *dup_game(const game_state *state)
game_state *ret = snew(game_state); game_state *ret = snew(game_state);
ret->cheating = state->cheating; ret->cheating = state->cheating;
ret->not_completed_clues = state->not_completed_clues;
ret->width = state->width; ret->width = state->width;
ret->height = state->height; ret->height = state->height;
ret->cells_contents = snewn(state->height * state->width, char); ret->cells_contents = snewn(state->height * state->width, char);