X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/2ac6d24e968232e9040ee0bca5e605b3a75e9c39..e73ca44d31d69b43224260ce04d06a745793800e:/fifteen.c diff --git a/fifteen.c b/fifteen.c index c29e9fe..3aba7fa 100644 --- a/fifteen.c +++ b/fifteen.c @@ -398,7 +398,7 @@ static game_state *solve_game(game_state *state, game_aux_info *aux, ret->tiles[i] = (i+1) % ret->n; ret->gap_pos = ret->n-1; ret->used_solve = ret->just_used_solve = TRUE; - ret->completed = ret->movecount; + ret->completed = ret->movecount = 1; return ret; } @@ -421,7 +421,7 @@ static char *game_text_format(game_state *state) */ maxlen = state->h * state->w * (col+1); - ret = snewn(maxlen, char); + ret = snewn(maxlen+1, char); p = ret; for (y = 0; y < state->h; y++) {