mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 04:43:26 +00:00
SCUMM: Fix potential crash in o5_setClass()
If 'obj' was exactly equal to _numActors, derefActor() would have complained about it being an invalid actor. I haven't seen any bug reports about this, so presumably it never actually happened.
This commit is contained in:
parent
bf90d36024
commit
fd40cb2224
@ -544,7 +544,7 @@ void ScummEngine_v5::o5_setClass() {
|
||||
} else if (cls == 0) {
|
||||
// Class '0' means: clean all class data
|
||||
_classData[obj] = 0;
|
||||
if ((_game.features & GF_SMALL_HEADER) && obj <= _numActors) {
|
||||
if ((_game.features & GF_SMALL_HEADER) && objIsActor(obj)) {
|
||||
Actor *a = derefActor(obj, "o5_setClass");
|
||||
a->_ignoreBoxes = false;
|
||||
a->_forceClip = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user