diff options
author | Lars Skovlund | 2015-12-28 05:50:26 +0100 |
---|---|---|
committer | Lars Skovlund | 2015-12-28 05:50:26 +0100 |
commit | 9a3084d320808554ba5d35b5fb9c36458da2eb55 (patch) | |
tree | d6cc44711d92c618b9679c5601ae1e07eab916fd | |
parent | f4022c0ab8ca2393055ad6430293c833bdacd6a8 (diff) | |
download | scummvm-rg350-9a3084d320808554ba5d35b5fb9c36458da2eb55.tar.gz scummvm-rg350-9a3084d320808554ba5d35b5fb9c36458da2eb55.tar.bz2 scummvm-rg350-9a3084d320808554ba5d35b5fb9c36458da2eb55.zip |
SCI: Fix when more than 10 font codes are used
-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) { |