Mercurial > hg > openttd
changeset 5204:353037c3a196 draft
(svn r7319) -Fix (r7182): (NewGRF) Add space for terminator when translating TTDPatch strings (thanks eddi)
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Fri, 01 Dec 2006 12:57:31 +0000 |
parents | 527eaecd804e |
children | 8052edec7218 |
files | newgrf_text.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/newgrf_text.c +++ b/newgrf_text.c @@ -156,7 +156,7 @@ 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);