From fa7a6d473e07d3bf2068bd58d3474e77634b0b30 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 2 Nov 2014 19:37:23 +0100 Subject: SCI: GetClosest() bugfix the bugfix thx wjp --- engines/sci/graphics/text16.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index c5c2054add..7552cb89ef 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -201,13 +201,13 @@ int16 GfxText16::GetLongest(const char *&textPtr, int16 maxWidth, GuiResourceId } // it's meant to pass through here case 0xA: - case 0: - SetFont(previousFontId); - _ports->penColor(previousPenColor); - return curCharCount; - case 0x9781: // this one is used by SQ4/japanese as line break as well - curCharCount += 2; textPtr += 2; + curCharCount++; textPtr++; + if (curChar > 0xFF) { + curCharCount++; textPtr++; + } + // and it's also meant to pass through here + case 0: SetFont(previousFontId); _ports->penColor(previousPenColor); return curCharCount; -- cgit v1.2.3