mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
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:
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());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user