SHERLOCK: Fix Fonts::unescape function

It ended up "unescaping" not escaped characters
This commit is contained in:
Vladimir Serbinenko 2023-02-28 23:29:42 +01:00
parent 0063c43a3d
commit 0eefb22032

View File

@ -235,21 +235,21 @@ Common::String Fonts::unescape(const Common::String& in) {
byte curChar = *curCharPtr;
byte nextChar = curCharPtr[1];
if (_isModifiedEucCn && !isInEucEscape && curChar == '@' && nextChar == '$') {
if (!isInEucEscape && curChar == '@' && nextChar == '$') {
curCharPtr++;
isInEucEscape = true;
out += ' ';
continue;
}
if (_isModifiedEucCn && isInEucEscape && curChar == '$' && nextChar == '@') {
if (isInEucEscape && curChar == '$' && nextChar == '@') {
curCharPtr++;
isInEucEscape = false;
out += ' ';
continue;
}
if (_isModifiedEucCn && curChar >= 0x41 && curChar < 0xa0) {
if (isInEucEscape && curChar >= 0x41 && curChar < 0xa0) {
out += curChar + 0x60;
continue;
}