1
0
Fork 0

(svn r7319) -Fix (r7182): (NewGRF) Add space for terminator when translating TTDPatch strings (thanks eddi)

release/0.5
peter1138 2006-12-01 12:57:31 +00:00
parent 1bcbf650b0
commit 47801ed883
1 changed files with 1 additions and 1 deletions

View File

@ -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);