Fix a memory management bug in Filling: in some situations its

solve_game() was returning its aux parameter un-dupstr()ed, which is
wrong. Also clarified the developer docs on that function to make it
clearer that the returned string should be dynamic.

[originally from svn r9831]
This commit is contained in:
Simon Tatham
2013-04-13 10:37:27 +00:00
parent 0b93de904a
commit 339329449f
2 changed files with 6 additions and 4 deletions

View File

@ -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);
}
/*****************************************************************************