diff options
author | Willem Jan Palenstijn | 2016-02-01 20:17:17 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2016-02-01 20:21:27 +0100 |
commit | f94153f07a69e986547391922c8aa85ab0086874 (patch) | |
tree | 2435af4a301d8bb99ad26cd53e6ac08441c57196 /devtools/skycpt/TextFile.h | |
parent | 8a0e8134938435524c79944656edf6807c3a3722 (diff) | |
download | scummvm-rg350-f94153f07a69e986547391922c8aa85ab0086874.tar.gz scummvm-rg350-f94153f07a69e986547391922c8aa85ab0086874.tar.bz2 scummvm-rg350-f94153f07a69e986547391922c8aa85ab0086874.zip |
TOUCHE: Fix semi-intentional array overrun
op_getInventoryItem/op_setInventoryItem could operate on
inventoryItems[4] while inventoryItems has only 4 elements. This
effectively accesses the 'money' field right behind this array.
Due to a broken assert, this was never detected.
This commit fixes it by redirecting accesses to inventoryItems[4] to
money, and also fixes the assert.
An alternative solution would have been enlarging the array, and
removing the money field, but that would require more changes in the
engine.
Diffstat (limited to 'devtools/skycpt/TextFile.h')
0 files changed, 0 insertions, 0 deletions