From b8a5507a17c456e9808a9b99a22c2dab7cd2c2a3 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Fri, 23 Apr 2010 21:57:29 +0000 Subject: SCI: fix for regression of r48778: do add spaces to width, if we are at ending of text - the whole change may be wrong altogether svn-id: r48779 --- engines/sci/graphics/text16.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci') 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 (textHeight, _ports->_curPort->fontHeight); textWidth += _font->getCharWidth(curChar); -- cgit v1.2.3