From 81a3538706c768c45e4166c1be10045355dce459 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 18 Feb 2011 17:51:49 +0100 Subject: 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. --- engines/tucker/tucker.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.3