From 40e42f859fa615a7c78231b6926aaf1e071a26e9 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 3 Oct 2010 14:52:15 +0000 Subject: SCI: Fix textwidth computation for chars >= 128 svn-id: r52992 --- engines/sci/graphics/controls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci') 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); -- cgit v1.2.3