[Scummvm-cvs-logs] scummvm master -> 81a3538706c768c45e4166c1be10045355dce459

cyxx cyx at scummvm.org
Fri Feb 18 22:32:23 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
81a3538706 TUCKER: fix #3106714 - Wrong animation after TV off


Commit: 81a3538706c768c45e4166c1be10045355dce459
    https://github.com/scummvm/scummvm/commit/81a3538706c768c45e4166c1be10045355dce459
Author: Gregory Montoir (cyx at scummvm.org)
Date: 2011-02-18T13:28:26-08:00

Commit Message:
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.

Changed paths:
    engines/tucker/tucker.cpp



diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 766172c..092bd74 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) {






More information about the Scummvm-git-logs mailing list