diff options
-rw-r--r-- | engines/sci/graphics/text16.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index 9fa5a3b81a..3d9db746af 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -267,8 +267,8 @@ void GfxText16::Width(const char *text, int16 from, int16 len, GuiResourceId org break; } default: - // if last character is a space, don't add it to textWidth - if ((curChar == ' ') && (!len)) + // if last character is a space and the text is not ending afterwards, don't add it to textWidth + if ((curChar == ' ') && (!len) && (*text != 0)) break; textHeight = MAX<int16> (textHeight, _ports->_curPort->fontHeight); textWidth += _font->getCharWidth(curChar); |