mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
TONY: Properly free items during loading when there is duplicates
This commit is contained in:
parent
dd8b4b519a
commit
5e062ce86c
@ -421,6 +421,16 @@ static const byte *parseItem(const byte *lpBuf, LPMPALITEM lpmiItem) {
|
||||
for (kk = 0; kk < curCmd; kk++) {
|
||||
if (compareCommands(&lpmiItem->_command[kk], &lpmiItem->_command[curCmd])) {
|
||||
lpmiItem->Action[i].CmdNum[j] = kk;
|
||||
|
||||
// Free any data allocated for the duplictaed command
|
||||
if (lpmiItem->_command[curCmd].type == 2) {
|
||||
globalDestroy(lpmiItem->_command[curCmd].lpszVarName);
|
||||
freeExpression(lpmiItem->_command[curCmd].expr);
|
||||
|
||||
lpmiItem->_command[curCmd].lpszVarName = NULL;
|
||||
lpmiItem->_command[curCmd].expr = 0;
|
||||
lpmiItem->_command[curCmd].type = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user