aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-04-29 23:23:45 +0300
committerEugene Sandulenko2013-04-29 23:23:45 +0300
commite629de317f8c72350c175052014afb55e58a73b6 (patch)
treeb84dc4c26321018054affd5abcac8668e0a6b671 /engines
parentb1893bc5f7929aa363a46f17bf2312fe053cb6ae (diff)
downloadscummvm-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.cpp8
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;