diff options
Diffstat (limited to 'engines/titanic/support/font.cpp')
-rw-r--r-- | engines/titanic/support/font.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index f4466def31..07e4c28991 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -112,7 +112,7 @@ int STFont::stringWidth(const CString &text) const { const char *srcP = text.c_str(); int total = 0; char c; - while (c = (*srcP++)) { + while ((c = *srcP++)) { if (c == 26) { // Skip over command parameter bytes srcP += 3; @@ -120,7 +120,7 @@ int STFont::stringWidth(const CString &text) const { // Skip over command parameter bytes srcP += 4; } else if (c != '\n') { - total += _chars[c]._width; + total += _chars[(byte)c]._width; } } |