mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r7319) -Fix (r7182): (NewGRF) Add space for terminator when translating TTDPatch strings (thanks eddi)
This commit is contained in:
parent
68502b1e80
commit
94b616630e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user