summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-06-07 19:05:04 +0000
committerrubidium <rubidium@openttd.org>2013-06-07 19:05:04 +0000
commitb35b17beebda166674c78f9dfbf133fa88aef8d3 (patch)
treef62ee8192c30ba283743320024c3444764748abe /src/strgen
parent3283cf937351a4a5ae2c09aef842af84cd09feec (diff)
downloadopenttd-b35b17beebda166674c78f9dfbf133fa88aef8d3.tar.xz
(svn r25326) -Fix [FS#5589]: check for zero width space in translations and fail upon finding them
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen_base.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp
index adb1de0a5..8539b49b8 100644
--- a/src/strgen/strgen_base.cpp
+++ b/src/strgen/strgen_base.cpp
@@ -723,6 +723,7 @@ void StringReader::HandleString(char *str)
WChar c;
Utf8Decode(&c, tmp);
if (c <= 0x001F || // ASCII control character range
+ c == 0x200B || // Zero width space
(c >= 0xE000 && c <= 0xF8FF) || // Private range
(c >= 0xFFF0 && c <= 0xFFFF)) { // Specials range
strgen_fatal("Unwanted UTF-8 character U+%04X in sequence '%s'", c, s);