LibACPI: Fix a crash on filtered opcode at root

When an opcode would get filtered at root it would try to get the
opcode value to print the error message, which is absent on the root
frame.
This commit is contained in:
Undefine authored and Sönke Holz committed 2026-11-01 15:08:28 +01:00
1 parent e8b902135b
commit beb73684de
1 file changed
+3
@@ -326,6 +326,9 @@ ErrorOr<IterationDecision> Interpreter::cycle(TableStream& stream)
auto opcode = TRY(stream.read_opcode());
if (!top_opcode_frame.filter_opcode_for_next_operand(opcode)) {
DEBUG_LOG("Failure!");
if (m_opcode_frames.size() == 1)
INTERPRETER_ERROR("Filtered opcode!", EINVAL, "Argument opcode {} filtered at root!", opcode);
INTERPRETER_ERROR("Filtered opcode!", EINVAL, "Argument opcode {} filtered by opcode {}!", opcode, top_opcode_frame.opcode());
}