diff options
author | Gregory Montoir | 2011-02-18 17:51:49 +0100 |
---|---|---|
committer | Gregory Montoir | 2011-02-18 22:28:26 +0100 |
commit | 81a3538706c768c45e4166c1be10045355dce459 (patch) | |
tree | 1bcbd1d9258dabdb7f59a399d6e6b57da18b79d3 | |
parent | 3a86b5f285ec97b32afda7d8fc0eea35659f1c75 (diff) | |
download | scummvm-rg350-81a3538706c768c45e4166c1be10045355dce459.tar.gz scummvm-rg350-81a3538706c768c45e4166c1be10045355dce459.tar.bz2 scummvm-rg350-81a3538706c768c45e4166c1be10045355dce459.zip |
TUCKER: fix #3106714 - Wrong animation after TV off
Some negative values are prefixed by 2 minus signs, skip one
before passing the string to strtol.
-rw-r--r-- | engines/tucker/tucker.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 766172c87f..092bd74a47 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -3088,6 +3088,11 @@ int TuckerEngine::readTableInstructionCode(int *index) { } int TuckerEngine::readTableInstructionParam(int len) { + // skip duplicated minus signs (bua,--1, c0a,--1, ...) + if (len >= 3 && memcmp(_tableInstructionsPtr, "--", 2) == 0) { + ++_tableInstructionsPtr; + --len; + } char *end = 0; const int param = strtol((const char *)_tableInstructionsPtr, &end, 10); if (end != (const char *)_tableInstructionsPtr + len) { |