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 | 9bfd73889aeffed11e56d7d95ec36a7521b46a98 (patch) | |
tree | 751a4facb5dae904041bc5c2295af234f88a2dd9 | |
parent | eb61fde8e3a059c3c2f782c1ec333f485dc9247f (diff) | |
download | openttd-9bfd73889aeffed11e56d7d95ec36a7521b46a98.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 (;;) { |