Don't use payload strings directly as the format for printf.

[originally from svn r8839]
This commit is contained in:
Simon Tatham
2010-01-13 19:25:57 +00:00
parent 65b37d5dd5
commit 854f4b2386

View File

@ -1941,13 +1941,13 @@ int main(int argc, char **argv)
if (verbose) { if (verbose) {
tgame = game_text_format(s); tgame = game_text_format(s);
printf(tgame); fputs(tgame, stdout);
sfree(tgame); sfree(tgame);
} }
soln = solve_specific(s, DIFF_ANY, 0); soln = solve_specific(s, DIFF_ANY, 0);
tgame = game_text_format(s); tgame = game_text_format(s);
printf(tgame); fputs(tgame, stdout);
sfree(tgame); sfree(tgame);
printf("Game was %s.\n\n", printf("Game was %s.\n\n",
soln < 0 ? "impossible" : soln > 0 ? "solved" : "not solved"); soln < 0 ? "impossible" : soln > 0 ? "solved" : "not solved");