Fix for bug #1837503. Location switches can be scheduled recursively, so now flags needed to be handled in a safer way to prevent inconsistencies.

svn-id: r29763
This commit is contained in:
Nicola Mettifogo 2007-12-08 11:07:03 +00:00
parent e204af821f
commit bf2bc3db80

View file

@ -370,6 +370,10 @@ void Parallaction_ns::changeLocation(char *location) {
_gfx->setBlackPalette();
_gfx->updateScreen();
// BUG #1837503: kEngineChangeLocation flag must be cleared *before* commands
// and acommands are executed, so that it can be set again if needed.
_engineFlags &= ~kEngineChangeLocation;
runCommands(_location._commands);
doLocationEnterTransition();
@ -381,8 +385,6 @@ void Parallaction_ns::changeLocation(char *location) {
debugC(1, kDebugExec, "changeLocation() done");
_engineFlags &= ~kEngineChangeLocation;
return;
}