aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/graphics/text16.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 74ffe4f8c1..9fa5a3b81a 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -267,6 +267,9 @@ 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))
+ break;
textHeight = MAX<int16> (textHeight, _ports->_curPort->fontHeight);
textWidth += _font->getCharWidth(curChar);
}