From f9cd78cedd48371f8aa9d98cbcdeb879fe543fac Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 25 Apr 2004 13:34:19 +0000 Subject: [PATCH] Workaround for bug #864030 (COMI: ASCII 0xb (11) not handled) svn-id: r13621 --- scumm/charset.cpp | 4 +--- scumm/string.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 2c0ba2ea56d..dec2790b721 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -146,9 +146,7 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) { while ((chr = str[pos++]) != 0) { if (chr == '@') continue; - if (chr == 254) - chr = 255; - if (chr == 255) { + if (chr == 254 || chr == 255) { chr = str[pos++]; if (chr == 3) // 'Wait' break; diff --git a/scumm/string.cpp b/scumm/string.cpp index ca4a4505f6e..359ce08ea4e 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -191,6 +191,14 @@ void ScummEngine::CHARSET_1() { _keepText = false; break; } + + // FIXME: This is a workaround for bug #864030: In COMI, some text + // contains ASCII character 11 = 0xB. It's not quite clear what it is + // good for; so for now we just ignore it, which seems to match the + // original engine (BTW, traditionally, this is a 'vertical tab'). + if (c == 0x0B) + continue; + if (c == 13) { newLine:; _charset->_nextLeft = _string[0].xpos;