diff options
author | Sylvain Dupont | 2010-10-10 14:30:13 +0000 |
---|---|---|
committer | Sylvain Dupont | 2010-10-10 14:30:13 +0000 |
commit | 0d6d895478dee36170c4c1d909c5f9b3354ec68b (patch) | |
tree | 4121a8e34ff8163ec6552d330fccecb6a57e9f89 /engines/toon/toon.cpp | |
parent | 7a7eabb139687dd1de434f13b4b622693e6db06e (diff) | |
download | scummvm-rg350-0d6d895478dee36170c4c1d909c5f9b3354ec68b.tar.gz scummvm-rg350-0d6d895478dee36170c4c1d909c5f9b3354ec68b.tar.bz2 scummvm-rg350-0d6d895478dee36170c4c1d909c5f9b3354ec68b.zip |
TOON: Disable too many levels of recursion with click events
svn-id: r53119
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r-- | engines/toon/toon.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index f1a31323c7..4843d39add 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -1121,7 +1121,8 @@ int32 ToonEngine::randRange(int32 minStart, int32 maxStart) { int32 ToonEngine::runEventScript(int32 x, int32 y, int32 mode, int32 id, int32 scriptId) { - assert(_currentScriptRegion < 4); + if (_currentScriptRegion >= 4) + return 0; EMCState *status = &_scriptState[_currentScriptRegion]; _script->init(status, &_scriptData); @@ -1228,6 +1229,7 @@ void ToonEngine::clickEvent() { commandId = 2 * (_gameState->_mouseState - 1) + 16; } + _drew->stopWalk(); int16 command = currentHot->getData(commandId); int16 argument = currentHot->getData(commandId + 1); |