Er, except that I already had a makedist.sh. Transferred new version
[sgt/puzzles] / fifteen.c
index c29e9fe..3aba7fa 100644 (file)
--- 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++) {