aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/support/font.cpp')
-rw-r--r--engines/titanic/support/font.cpp8
1 files changed, 5 insertions, 3 deletions
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) {