diff options
author | Filippos Karapetis | 2012-11-06 01:47:03 +0200 |
---|---|---|
committer | Filippos Karapetis | 2012-11-06 01:47:03 +0200 |
commit | 06a2ac495de588103f4c42bb03597d965965e8cf (patch) | |
tree | 80914ddcd3b6ad07ad36c6be0f52860d0c213389 /engines | |
parent | bdb8bdae2a206e736278321d599ed2d1e3ae8b76 (diff) | |
download | scummvm-rg350-06a2ac495de588103f4c42bb03597d965965e8cf.tar.gz scummvm-rg350-06a2ac495de588103f4c42bb03597d965965e8cf.tar.bz2 scummvm-rg350-06a2ac495de588103f4c42bb03597d965965e8cf.zip |
DREAMWEB: Also filter out invalid characters in getNextWord()
Thanks again to eriktorbjorn for spotting this. This one should be the
last place where we should filter out invalid characters
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/print.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index f5a0ed3c15..d9350e11e4 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -49,7 +49,9 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri return 0; } firstChar = modifyChar(firstChar); - if (firstChar != 255) { + // WORKAROUND: Also filter out invalid characters here (refer to the + // workaround in printChar() below for more info). + if (firstChar >= 32 && firstChar != 255) { uint8 secondChar = *string; uint8 width = charSet._frames[firstChar - 32 + _charShift].width; width = kernChars(firstChar, secondChar, width); |