From 3325d42487d10a533ccf918ef37aa69e545d9ed5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 1 Aug 2016 20:05:16 -0400 Subject: TITANIC: Fix Coverity warnings --- engines/titanic/support/avi_surface.cpp | 2 +- engines/titanic/support/font.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/titanic/support') 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) { -- cgit v1.2.3