aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-23 21:57:29 +0000
committerMartin Kiewitz2010-04-23 21:57:29 +0000
commitb8a5507a17c456e9808a9b99a22c2dab7cd2c2a3 (patch)
treee4f09327fa1c5d3cc898fd1f91f02bbfd08d250a /engines/sci
parent62833a3fd31f8411ef052c81057a7cf49e8beafc (diff)
downloadscummvm-rg350-b8a5507a17c456e9808a9b99a22c2dab7cd2c2a3.tar.gz
scummvm-rg350-b8a5507a17c456e9808a9b99a22c2dab7cd2c2a3.tar.bz2
scummvm-rg350-b8a5507a17c456e9808a9b99a22c2dab7cd2c2a3.zip
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
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/text16.cpp4
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);