author | peter1138 |
Sat, 02 Dec 2006 09:34:18 +0000 | |
changeset 5208 | 3875a79e5596 |
parent 5207 | 6033f6727a6f |
child 5209 | 1b7a72191019 |
newgrf_text.c | file | annotate | diff | comparison | revisions |
--- a/newgrf_text.c Fri Dec 01 19:25:50 2006 +0000 +++ b/newgrf_text.c Sat Dec 02 09:34:18 2006 +0000 @@ -159,13 +159,13 @@ 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 (;;) {