mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
d7249ab1de
1. Change CASE(OP_DEBUG, Z) to CASE(OP_DEBUG, BBB) to match the definition in include/mruby/ops.h. The previous code declared Z (no operands) but then manually called FETCH_BBB(), which caused incorrect behavior with extended opcodes (OP_EXT1/2/3). 2. Add NULL check before calling debug_op_hook, consistent with how code_fetch_hook is handled. This prevents crashes when MRB_USE_DEBUG_HOOK is enabled but no hook function is set. Fixes: #5686