DREAMWEB: Fix emergencyPurge checks

It could re-delete previously deleted objects, causing
ex data (frame/text) corruption. This is the likely cause of bug #3591088.

Asm conversion error from eaf87bdfa7.
This commit is contained in:
Willem Jan Palenstijn 2012-11-30 14:19:14 +01:00
parent 6fd5f650bc
commit f5dbd23bab

View file

@ -1131,7 +1131,8 @@ void DreamWebEngine::purgeAnItem() {
const DynObject *extraObjects = _exData;
for (uint i = 0; i < kNumexobjects; ++i) {
if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
if (extraObjects[i].mapad[0] == 0 &&
(extraObjects[i].objId[0] == 255 || extraObjects[i].objId[0] == 2) &&
extraObjects[i].initialLocation != _realLocation) {
deleteExObject(i);
return;
@ -1139,7 +1140,7 @@ void DreamWebEngine::purgeAnItem() {
}
for (uint i = 0; i < kNumexobjects; ++i) {
if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
if (extraObjects[i].mapad[0] == 0 && extraObjects[i].objId[0] == 255) {
deleteExObject(i);
return;
}