From 4f98ab5789bc0c10ba1fe5265fcbd181946dc162 Mon Sep 17 00:00:00 2001 From: Andrea Boscarino Date: Tue, 10 Aug 2021 20:56:18 +0200 Subject: [PATCH] SCUMM: COMI: Fix getStringWidth behavior --- engines/scumm/script_v8.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index a9ac86193fa..2e317258ff6 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -1337,13 +1337,13 @@ void ScummEngine_v8::o8_getStringWidth() { // Skip to the next instruction _scriptPointer += resStrLen(_scriptPointer) + 1; - translateText(msg, transBuf); + convertMessageToString(msg, transBuf, 256); msg = transBuf; // Temporary set the specified charset id _charset->setCurID(charset); // Determine the strings width - width = _charset->getStringWidth(0, msg); + width = _charset->getStringWidth(0, msg) - 1; // Revert to old font _charset->setCurID(oldID);