Skip to content

Commit

Permalink
Fix ruined stack in rm_mult_objs_from_inven
Browse files Browse the repository at this point in the history
- Also fixed incorrect opcode name in error message in inven_cmd
  • Loading branch information
phobos2077 committed May 23, 2023
1 parent 90911ba commit 0c3794d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interpreter_extra.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3098,8 +3098,7 @@ static void _op_inven_cmds(Program* program)
break;
}
} else {
// FIXME: Should be inven_cmds.
scriptPredefinedError(program, "anim", SCRIPT_ERROR_OBJECT_IS_NULL);
scriptPredefinedError(program, "inven_cmds", SCRIPT_ERROR_OBJECT_IS_NULL);
}

programStackPushPointer(program, item);
Expand Down Expand Up @@ -3657,7 +3656,8 @@ static void opRemoveMultipleObjectsFromInventory(Program* program)
Object* owner = static_cast<Object*>(programStackPopPointer(program));

if (owner == NULL || item == NULL) {
// FIXME: Ruined stack.
scriptPredefinedError(program, "rm_mult_objs_from_inven", SCRIPT_ERROR_OBJECT_IS_NULL);
programStackPushInteger(program, 0);
return;
}

Expand Down

0 comments on commit 0c3794d

Please sign in to comment.