Allow for trailing '\0' in game_text_format() in various games.

[originally from svn r5743]
This commit is contained in:
Jacob Nevins
2005-05-04 12:56:04 +00:00
parent 38c1f9b702
commit 2621183246
4 changed files with 4 additions and 4 deletions

View File

@ -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++) {