WAGE: Plug memory leak

This commit is contained in:
Eugene Sandulenko 2016-02-18 10:21:19 +01:00
parent b01fb9f3f3
commit c3bae66b56
2 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,7 @@ bool Script::execute(World *world, int loopCount, Common::String *inputText, Des
Operand *op = readStringOperand(); // allows empty menu
// TODO check op type is string.
_engine->setMenu(op->toString());
delete op;
byte d = _data->readByte();
if (d != 0xFD)
warning("Operand 0x8B (PRINT) End Byte != 0xFD");

View File

@ -274,6 +274,7 @@ bool World::loadWorld(Common::MacResManager *resMan) {
for (uint i = 0; i < string.size() && string[i] != ';'; i++) // Read token
_aboutMenuItemName += string[i];
delete menu;
delete res;
}
res = resMan->getResource(MKTAG('M','E','N','U'), 2004);