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

2
rect.c
View File

@ -1081,7 +1081,7 @@ static char *game_text_format(game_state *state)
*/
maxlen = (2*state->h+1) * (state->w * (col+1) + 2);
ret = snewn(maxlen, char);
ret = snewn(maxlen+1, char);
p = ret;
for (y = 0; y <= 2*state->h; y++) {