WINTERMUTE: Fix font-related crash.

This commit is contained in:
Einar Johan Trøan Sømåen 2012-05-11 00:49:04 +02:00 committed by Einar Johan Trøan Sømåen
parent 858989a685
commit d4fd90e064

View File

@ -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;