diff options
-rw-r--r-- | script_v1.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script_v1.cpp b/script_v1.cpp index dcba8b0498..1eb9c35e88 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -2785,6 +2785,12 @@ void Scumm::o5_pickupObjectOld() { int obj = getVarOrDirectWord(0x80); + // FIXME: Zak256 (Zaire): Why does this happen at all? + if (obj < 1) { + warning("pickupObjectOld recieved negative index"); + return; + } + if (getObjectIndex(obj) == -1) return; |