summaryrefslogtreecommitdiff
path: root/newgrf_text.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-01 12:57:31 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-01 12:57:31 +0000
commit47801ed88338a165ea5f512f8be061eadd125203 (patch)
tree5371b2de67066e2f40447f0c795f4615041a29d4 /newgrf_text.c
parent1bcbf650b08227cb8e45207906866a7c7a2818e7 (diff)
downloadopenttd-47801ed88338a165ea5f512f8be061eadd125203.tar.xz
(svn r7319) -Fix (r7182): (NewGRF) Add space for terminator when translating TTDPatch strings (thanks eddi)
Diffstat (limited to 'newgrf_text.c')
-rw-r--r--newgrf_text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newgrf_text.c b/newgrf_text.c
index 6596c82d2..3afffb959 100644
--- a/newgrf_text.c
+++ b/newgrf_text.c
@@ -156,7 +156,7 @@ static byte _currentLangID = GRFLX_ENGLISH; //by default, english is used.
static char *TranslateTTDPatchCodes(const char *str)
{
- char *tmp = malloc(strlen(str) * 10); /* Allocate space to allow for expansion */
+ char *tmp = malloc(strlen(str) * 10 + 1); /* Allocate space to allow for expansion */
char *d = tmp;
bool unicode = false;
WChar c = Utf8Consume(&str);