From d1793fb8333d5f1badd7a97a012ddb081494e5ce Mon Sep 17 00:00:00 2001 From: Simon Delamarre Date: Sat, 29 Oct 2022 00:43:40 +0200 Subject: [PATCH] GOB: fix in oPlaytoons_printText --- engines/gob/inter_playtoons.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index 517d24641c6..6d2f50a9768 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -97,7 +97,6 @@ void Inter_Playtoons::setupOpcodesGob() { void Inter_Playtoons::oPlaytoons_printText(OpFuncParams ¶ms) { char buf[60]; - int i; int16 oldTransparency; _vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr(); @@ -123,8 +122,9 @@ void Inter_Playtoons::oPlaytoons_printText(OpFuncParams ¶ms) { // _vm->_draw->_frontColor += colMod; oldTransparency = _vm->_draw->_transparency; + int i = 0; do { - for (i = 0; (_vm->_game->_script->peekChar() != '.') && + for (; (_vm->_game->_script->peekChar() != '.') && (_vm->_game->_script->peekByte() != 200); i++) { buf[i] = _vm->_game->_script->readChar(); }