aboutsummaryrefslogtreecommitdiff
path: root/rect.c
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2005-05-04 12:56:04 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2005-05-04 12:56:04 +0000
commit262118324645da482747ef6c319fc428a40eb716 (patch)
tree3edd178d1f8478d4ebe501ad489bccddaba3a694 /rect.c
parent38c1f9b7028c4405e1e8145bc6639e33ffce147b (diff)
downloadpuzzles-262118324645da482747ef6c319fc428a40eb716.zip
puzzles-262118324645da482747ef6c319fc428a40eb716.tar.gz
puzzles-262118324645da482747ef6c319fc428a40eb716.tar.bz2
puzzles-262118324645da482747ef6c319fc428a40eb716.tar.xz
Allow for trailing '\0' in game_text_format() in various games.
[originally from svn r5743]
Diffstat (limited to 'rect.c')
-rw-r--r--rect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rect.c b/rect.c
index abfd332..ffb3725 100644
--- a/rect.c
+++ b/rect.c
@@ -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++) {