Skip to content
Snippets Groups Projects
Commit efdcd6ba authored by Milan Rossa's avatar Milan Rossa Committed by Damien George
Browse files

py/showbc: Fix off-by-one when showing address of unknown opcode.

parent cd35dd9d
No related branches found
No related tags found
No related merge requests found
......@@ -540,7 +540,7 @@ const byte *mp_bytecode_print_str(const byte *ip) {
mp_uint_t op = ip[-1] - MP_BC_BINARY_OP_MULTI;
printf("BINARY_OP " UINT_FMT " %s", op, qstr_str(mp_binary_op_method_name[op]));
} else {
printf("code %p, byte code 0x%02x not implemented\n", ip, ip[-1]);
printf("code %p, byte code 0x%02x not implemented\n", ip - 1, ip[-1]);
assert(0);
return ip;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment