diff options
author | Paul Gilbert | 2016-08-01 20:05:16 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-01 20:05:16 -0400 |
commit | 3325d42487d10a533ccf918ef37aa69e545d9ed5 (patch) | |
tree | 5c56950c643dfe58e56b458a7e70faf2a42e03cc /engines/titanic/support | |
parent | 903dc7d1d27ae9bbbca6b768c6511763e9755407 (diff) | |
download | scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.tar.gz scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.tar.bz2 scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.zip |
TITANIC: Fix Coverity warnings
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/support/font.cpp | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 6507c8bbd4..c37bd83616 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -258,7 +258,7 @@ void AVISurface::setupDecompressor() { g_system->getScreenFormat()); // TODO: See whether this simplified form of original works - if (idx == 2) + if (idx == 1) _videoSurface->_transBlitFlag = true; } } diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index 07e4c28991..69c0efe504 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -260,12 +260,14 @@ void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) cons if (*srcPtr == ' ' && flag) break; - if (*srcPtr == TEXTCMD_NPC) + if (*srcPtr == TEXTCMD_NPC) { srcPtr += 3; - else if (*srcPtr == TEXTCMD_SET_COLOR) + } else if (*srcPtr == TEXTCMD_SET_COLOR) { srcPtr += 4; - else + } else { totalWidth += _chars[(byte)*srcPtr]._width; + flag = true; + } } if ((textSize.x + totalWidth) >= maxWidth && totalWidth < maxWidth) { |