mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 21:21:05 +00:00
GRIFFON: fix invalid mem access / crash
This can be triggered by walking 1 screen left and 1 screen down from the start. When loading a new map the game resets only onMap for all members of the _npcInfo array, but does not always check that value when iterating over the (valid and invalid) entries of the array.
This commit is contained in:
parent
3b4515b337
commit
715c9f6993
@ -109,6 +109,9 @@ void GriffonEngine::updateY() {
|
||||
_lasty = 0;
|
||||
|
||||
for (int i = 1; i <= _lastNpc; i++) {
|
||||
if (!_npcInfo[i].onMap)
|
||||
continue;
|
||||
|
||||
int yy = (int)(_npcInfo[i].y * 10);
|
||||
|
||||
do {
|
||||
|
Loading…
x
Reference in New Issue
Block a user