aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2007-04-01 11:47:35 +0000
committerPaul Gilbert2007-04-01 11:47:35 +0000
commit3abdfa46f99b94b3b15294ff5fc9f4e671398230 (patch)
tree3b3d5d1708a3d44d94beb726b22eff548b7eed14
parent18ef96d08bccb7d8afbe7ad42fae085ed8e36ea9 (diff)
downloadscummvm-rg350-3abdfa46f99b94b3b15294ff5fc9f4e671398230.tar.gz
scummvm-rg350-3abdfa46f99b94b3b15294ff5fc9f4e671398230.tar.bz2
scummvm-rg350-3abdfa46f99b94b3b15294ff5fc9f4e671398230.zip
Bugfix for strings that wrapped near a carriage return character
svn-id: r26337
-rw-r--r--engines/lure/surface.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index b05fd0596c..6c3154660a 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -328,10 +328,8 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines)
// Break word onto next line
*(wordStart - 1) = '\0';
++numLines;
- if (newLine)
- lineWidth = 0;
- else
- lineWidth = textWidth(wordStart, (int) (wordEnd - wordStart + 1));
+ lineWidth = 0;
+ wordEnd = wordStart;
} else if (newLine) {
// Break on newline
++numLines;