aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-08-13 06:32:16 +0000
committerTorbjörn Andersson2006-08-13 06:32:16 +0000
commit4476ed5294e011e4e5eea08117791c3990519211 (patch)
treecce3e2d9e07fa1ed58bfbaf981eef8b7778a9125
parentb4311d15cadb4ed35980065a46f52b2cb63d28f6 (diff)
downloadscummvm-rg350-4476ed5294e011e4e5eea08117791c3990519211.tar.gz
scummvm-rg350-4476ed5294e011e4e5eea08117791c3990519211.tar.bz2
scummvm-rg350-4476ed5294e011e4e5eea08117791c3990519211.zip
Made FF use the same max length for every line when word-wrapping subtitles,
rather than using the length of the previous line. This fixes bug #1536401. svn-id: r23706
-rw-r--r--NEWS1
-rw-r--r--engines/simon/string.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index c718036566..b683aa76e7 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
Simon
- Improved support for international versions of the Feeble Files.
- Fixed undefined behaviour when loading music.
+ - Fixed crash when displaying some subtitles in the Feeble Files.
Broken Sword 2
- More robust handling of the optional startup.inf file.
diff --git a/engines/simon/string.cpp b/engines/simon/string.cpp
index 447f258781..6975ea53d3 100644
--- a/engines/simon/string.cpp
+++ b/engines/simon/string.cpp
@@ -365,16 +365,15 @@ void SimonEngine::printScreenText(uint vgaSpriteId, uint color, const char *stri
if (getGameType() == GType_FF) {
uint16 b, pixels, spaces;
- uint16 curWdth = width;
while (1) {
- string2 = getPixelLength(string, curWdth, pixels);
+ string2 = getPixelLength(string, width, pixels);
if (*string2 == 0) {
spaces = (width - pixels) / 12;
if (spaces != 0)
spaces--;
while (spaces) {
- *convertedString2++=' ';
+ *convertedString2++ = ' ';
spaces--;
}
strcpy(convertedString2, string);
@@ -400,7 +399,6 @@ void SimonEngine::printScreenText(uint vgaSpriteId, uint color, const char *stri
y -= textHeight;
if (y < 2)
y = 2;
- curWdth = pixels;
string = string2;
}
} else {