aboutsummaryrefslogtreecommitdiff
path: root/twiddle.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 /twiddle.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 'twiddle.c')
-rw-r--r--twiddle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/twiddle.c b/twiddle.c
index 5209606..b03ca01 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -521,7 +521,7 @@ static char *game_text_format(game_state *state)
*/
maxlen = state->h * state->w * (col+o+1);
- ret = snewn(maxlen, char);
+ ret = snewn(maxlen+1, char);
p = ret;
for (y = 0; y < state->h; y++) {