aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2010-10-03 14:52:15 +0000
committerWillem Jan Palenstijn2010-10-03 14:52:15 +0000
commit40e42f859fa615a7c78231b6926aaf1e071a26e9 (patch)
tree6c24103c682eab1133daa5fea56468bbaae277ae /engines/sci
parent6ca15d0888922e95fe9fdd52c09586e35250d4fd (diff)
downloadscummvm-rg350-40e42f859fa615a7c78231b6926aaf1e071a26e9.tar.gz
scummvm-rg350-40e42f859fa615a7c78231b6926aaf1e071a26e9.tar.bz2
scummvm-rg350-40e42f859fa615a7c78231b6926aaf1e071a26e9.zip
SCI: Fix textwidth computation for chars >= 128
svn-id: r52992
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/controls.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index 1abb8478a1..70ff70daab 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -234,7 +234,7 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) {
uint16 textWidth = 0;
const char *textPtr = text.c_str();
while (*textPtr)
- textWidth += _text16->_font->getCharWidth(*textPtr++);
+ textWidth += _text16->_font->getCharWidth((byte)*textPtr++);
textWidth += _text16->_font->getCharWidth(eventKey);
if (textWidth >= rect.width()) {
_text16->SetFont(oldFontId);