aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.h
diff options
context:
space:
mode:
authorMartin Kiewitz2017-02-24 00:54:40 +0100
committerMartin Kiewitz2017-02-24 00:54:40 +0100
commitbe763b59aa44c126ace6f0b8854d3ebc2ff62d37 (patch)
treec93af4749469dbb3e580b72b52809efdef443ac3 /engines/agi/agi.h
parent9dd0cd51d5b243700ccbd154e1d91ddb84c307c2 (diff)
downloadscummvm-rg350-be763b59aa44c126ace6f0b8854d3ebc2ff62d37.tar.gz
scummvm-rg350-be763b59aa44c126ace6f0b8854d3ebc2ff62d37.tar.bz2
scummvm-rg350-be763b59aa44c126ace6f0b8854d3ebc2ff62d37.zip
AGI: act on exitAllLogics in testIfCode (fixes bug #9707)
Thanks waltervn for finding this one. Was a regression caused by the timer heuristic for detecting bad script code. When the heuristic identified being in an inner timer loop, it told ScummVM to sleep + process events. During that time a restore can get triggered by the user via GMM. When that happens, the restore is executed immediately. When still being inside testIfCode(), it may happen that execution goes beyond the end of the current logic incl. error/crash. TODO: maybe better change GMM as a whole for AGI, that restores are always processed in a delayed way after main loop got processed once?
Diffstat (limited to 'engines/agi/agi.h')
-rw-r--r--engines/agi/agi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 46d0a341df..2294593427 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -867,7 +867,7 @@ public:
void unloadLogic(int16 logicNr);
int runLogic(int16 logicNr);
void debugConsole(int, int, const char *);
- int testIfCode(int);
+ bool testIfCode(int16 logicNr);
void executeAgiCommand(uint8, uint8 *);
private: