aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-05 19:55:31 -0400
committerPaul Gilbert2016-11-05 19:55:31 -0400
commit28537800c486ceccb60628c7d3e1c5f3263ffdf7 (patch)
treef3735a7f843a4dfe726eccf27211830c5868dcf1 /engines/titanic/support
parentcf1efc84308ec763ea78d166a14057a95c379cab (diff)
downloadscummvm-rg350-28537800c486ceccb60628c7d3e1c5f3263ffdf7.tar.gz
scummvm-rg350-28537800c486ceccb60628c7d3e1c5f3263ffdf7.tar.bz2
scummvm-rg350-28537800c486ceccb60628c7d3e1c5f3263ffdf7.zip
TITANIC: Fix line wrapping in conversation log
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/font.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp
index b91a7ec728..2e98639ff7 100644
--- a/engines/titanic/support/font.cpp
+++ b/engines/titanic/support/font.cpp
@@ -152,7 +152,7 @@ int STFont::writeString(CVideoSurface *surface, const Rect &rect1, const Rect &d
setColor(r, g, b);
} else {
if (*srcP == ' ') {
- // Check fo rline wrapping
+ // Check for line wrapping
checkLineWrap(textSize, rect1.width(), srcP);
if (!*srcP)
return endP - str.c_str();
@@ -315,7 +315,7 @@ void STFont::extendBounds(Point &textSize, byte c, int maxWidth) const {
void STFont::checkLineWrap(Point &textSize, int maxWidth, const char *&str) const {
bool flag = false;
int totalWidth = 0;
- for (const char *srcPtr = str; *srcPtr && *srcPtr != ' '; ++srcPtr) {
+ for (const char *srcPtr = str + 1; *srcPtr && *srcPtr != ' '; ++srcPtr) {
if (*srcPtr == ' ' && flag)
break;