diff options
author | Martin Kiewitz | 2014-11-02 19:37:23 +0100 |
---|---|---|
committer | Martin Kiewitz | 2014-11-02 19:37:23 +0100 |
commit | fa7a6d473e07d3bf2068bd58d3474e77634b0b30 (patch) | |
tree | 16e157373a9753f7f5fde50d03a7d6e01ee25286 | |
parent | 11ba4474830ad0557de5a8c2b47dcd3000bc0032 (diff) | |
download | scummvm-rg350-fa7a6d473e07d3bf2068bd58d3474e77634b0b30.tar.gz scummvm-rg350-fa7a6d473e07d3bf2068bd58d3474e77634b0b30.tar.bz2 scummvm-rg350-fa7a6d473e07d3bf2068bd58d3474e77634b0b30.zip |
SCI: GetClosest() bugfix the bugfix thx wjp
-rw-r--r-- | engines/sci/graphics/text16.cpp | 12 |
1 files 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; |