diff options
author | Einar Johan Trøan Sømåen | 2012-05-11 00:49:04 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-02 12:42:11 +0200 |
commit | d4fd90e06479f76df274a80e20387e3c79515e3a (patch) | |
tree | 519cde0c5cd279e007dbb705fa1a43b6aaa05efc /engines/wintermute | |
parent | 858989a6852c74a565554fafb824a1faacaa706d (diff) | |
download | scummvm-rg350-d4fd90e06479f76df274a80e20387e3c79515e3a.tar.gz scummvm-rg350-d4fd90e06479f76df274a80e20387e3c79515e3a.tar.bz2 scummvm-rg350-d4fd90e06479f76df274a80e20387e3c79515e3a.zip |
WINTERMUTE: Fix font-related crash.
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/BFontBitmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/BFontBitmap.cpp b/engines/wintermute/BFontBitmap.cpp index 3bec9d5a20..71bbf95801 100644 --- a/engines/wintermute/BFontBitmap.cpp +++ b/engines/wintermute/BFontBitmap.cpp @@ -166,7 +166,7 @@ int CBFontBitmap::TextHeightDraw(byte *text, int x, int y, int width, TTextAlig long_line = true;
}
- if (str[index + 1] == '\0' || (MaxLenght >= 0 && index == MaxLenght - 1)) {
+ if (str.size() == (index + 1) || (MaxLenght >= 0 && index == MaxLenght - 1)) {
done = true;
if (!new_line) {
end = index;
|