From 5cb94da9c5a8491d724c9d4eb950e38e3b9c44fa Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Wed, 17 Dec 2014 11:56:54 +0100 Subject: [PATCH] compensate for incorrect minus character in translated dialogue script (Fixes #2207) --- components/compiler/scanner.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index 203f27e6e8..488906d8ff 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -445,6 +445,32 @@ namespace Compiler else special = S_minus; } + else if (static_cast (c)==0xe2) + { + /// Workaround for some translator who apparently can't keep his minus in order + /// \todo disable for later script formats + if (get (c) && static_cast (c)==0x80 && + get (c) && static_cast (c)==0x93) + { + if (get (c)) + { + if (c=='>') + special = S_ref; + else + { + putback (c); + special = S_minus; + } + } + else + special = S_minus; + } + else + { + mErrorHandler.error ("Invalid character", mLoc); + return false; + } + } else if (c=='<') { if (get (c))