diff options
author | Eugene Sandulenko | 2013-04-29 23:23:45 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-04-29 23:23:45 +0300 |
commit | e629de317f8c72350c175052014afb55e58a73b6 (patch) | |
tree | b84dc4c26321018054affd5abcac8668e0a6b671 /engines | |
parent | b1893bc5f7929aa363a46f17bf2312fe053cb6ae (diff) | |
download | scummvm-rg350-e629de317f8c72350c175052014afb55e58a73b6.tar.gz scummvm-rg350-e629de317f8c72350c175052014afb55e58a73b6.tar.bz2 scummvm-rg350-e629de317f8c72350c175052014afb55e58a73b6.zip |
TOON: Fix logical branch error. CID 1004062
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toon/font.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp index 1e851ff4ae..e26ed92f83 100644 --- a/engines/toon/font.cpp +++ b/engines/toon/font.cpp @@ -116,15 +116,15 @@ void FontRenderer::computeSize(const Common::String &origText, int16 *retX, int1 const byte *text = (const byte *)origText.c_str(); while (*text) { byte curChar = *text; - if (curChar < 32) { - text++; - continue; - } else if (curChar == 13) { + if (curChar == 13) { totalWidth = MAX(totalWidth, lineWidth); totalHeight += lineHeight; lineHeight = 0; lineWidth = 0; lastLineHeight = 0; + } else if (curChar < 32) { + text++; + continue; } else { curChar = textToFont(curChar); int16 charWidth = _currentFont->getFrameWidth(curChar) - 1; |