Fix missing result on stack

Closes #95
Closes #96
This commit is contained in:
Alexander Batalov 2022-07-27 23:22:06 +03:00
parent cbdb0eeba4
commit 39057fd1fb
1 changed files with 4 additions and 0 deletions

View File

@ -3006,6 +3006,8 @@ static void opCritterGetInventoryObject(Program* program)
if (critter == gDude) { if (critter == gDude) {
if (interfaceGetCurrentHand() != HAND_LEFT) { if (interfaceGetCurrentHand() != HAND_LEFT) {
programStackPushPointer(program, critterGetItem2(critter)); programStackPushPointer(program, critterGetItem2(critter));
} else {
programStackPushPointer(program, NULL);
} }
} else { } else {
programStackPushPointer(program, critterGetItem2(critter)); programStackPushPointer(program, critterGetItem2(critter));
@ -3015,6 +3017,8 @@ static void opCritterGetInventoryObject(Program* program)
if (critter == gDude) { if (critter == gDude) {
if (interfaceGetCurrentHand() == HAND_LEFT) { if (interfaceGetCurrentHand() == HAND_LEFT) {
programStackPushPointer(program, critterGetItem1(critter)); programStackPushPointer(program, critterGetItem1(critter));
} else {
programStackPushPointer(program, NULL);
} }
} else { } else {
programStackPushPointer(program, critterGetItem1(critter)); programStackPushPointer(program, critterGetItem1(critter));