diff options
author | peter1138 <peter1138@openttd.org> | 2006-12-02 09:34:18 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-12-02 09:34:18 +0000 |
commit | 8e59299e72ae6e989f10fcc5226c2070abb44168 (patch) | |
tree | 751a4facb5dae904041bc5c2295af234f88a2dd9 | |
parent | 4bcf77f3dfd63887e9bb688b6ae3c1ede16adb06 (diff) | |
download | openttd-8e59299e72ae6e989f10fcc5226c2070abb44168.tar.xz |
(svn r7323) -Fix (r7182): When translating NewGRF strings, look at the first
character and move ahead if needed, instead of taking the first
character and moving back.
-rw-r--r-- | newgrf_text.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/newgrf_text.c b/newgrf_text.c index 3afffb959..e8d606d78 100644 --- a/newgrf_text.c +++ b/newgrf_text.c @@ -159,13 +159,13 @@ static char *TranslateTTDPatchCodes(const char *str) char *tmp = malloc(strlen(str) * 10 + 1); /* Allocate space to allow for expansion */ char *d = tmp; bool unicode = false; - WChar c = Utf8Consume(&str); + WChar c; + size_t len = Utf8Decode(&c, str); if (c == 0x00DE) { /* The thorn ('รพ') indicates a unicode string to TTDPatch */ unicode = true; - } else { - str--; + str += len; } for (;;) { |