From 39057fd1fbae70175b7b9d4a75587b027daf525b Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Wed, 27 Jul 2022 23:22:06 +0300 Subject: [PATCH] Fix missing result on stack Closes #95 Closes #96 --- src/interpreter_extra.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/interpreter_extra.cc b/src/interpreter_extra.cc index a536b0e..b5820ed 100644 --- a/src/interpreter_extra.cc +++ b/src/interpreter_extra.cc @@ -3006,6 +3006,8 @@ static void opCritterGetInventoryObject(Program* program) if (critter == gDude) { if (interfaceGetCurrentHand() != HAND_LEFT) { programStackPushPointer(program, critterGetItem2(critter)); + } else { + programStackPushPointer(program, NULL); } } else { programStackPushPointer(program, critterGetItem2(critter)); @@ -3015,6 +3017,8 @@ static void opCritterGetInventoryObject(Program* program) if (critter == gDude) { if (interfaceGetCurrentHand() == HAND_LEFT) { programStackPushPointer(program, critterGetItem1(critter)); + } else { + programStackPushPointer(program, NULL); } } else { programStackPushPointer(program, critterGetItem1(critter));