mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-28 04:34:50 +00:00
SCI: Fix textwidth computation for chars >= 128
svn-id: r52992
This commit is contained in:
parent
6ca15d0888
commit
40e42f859f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user