diff options
-rw-r--r-- | engines/sci/graphics/text16.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index 89c9be59f0..d118302e76 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -99,10 +99,8 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1 // c -> sets textColor to current port pen color // cX -> sets textColor to _textColors[X-1] curCode = textCode[0]; - curCodeParm = textCode[1]; - if (Common::isDigit(curCodeParm)) { - curCodeParm -= '0'; - } else { + curCodeParm = strtol(textCode+1, NULL, 10); + if (!Common::isDigit(textCode[1])) { curCodeParm = -1; } switch (curCode) { |