diff --git a/devel.but b/devel.but index e95e1d2..75ddeb7 100644 --- a/devel.but +++ b/devel.but @@ -1020,9 +1020,11 @@ it may return \cw{NULL}. If it does this, it must also set \q{Solution not known for this puzzle}); that error message is not expected to be dynamically allocated. -If this function \e{does} produce a solution, it returns a move -string suitable for feeding to \cw{execute_move()} -(\k{backend-execute-move}). +If this function \e{does} produce a solution, it returns a move string +suitable for feeding to \cw{execute_move()} +(\k{backend-execute-move}). Like a (non-empty) string returned from +\cw{interpret_move()}, the returned string should be dynamically +allocated. \H{backend-drawing} Drawing the game graphics diff --git a/filling.c b/filling.c index 4cd4318..cad0733 100644 --- a/filling.c +++ b/filling.c @@ -975,7 +975,7 @@ static char *solve_game(game_state *state, game_state *currstate, if (!solver(state->board, w, h, &aux)) *error = "Sorry, I couldn't find a solution"; } - return aux; + return dupstr(aux); } /*****************************************************************************