diff options
author | Milan Rossa <rossa.milan@gmail.com> | 2019-08-05 17:06:22 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-08-06 16:08:39 +1000 |
commit | efdcd6baa710af11bdc2f4930e42e439cc1b2ff8 (patch) | |
tree | 603e1023f5333e611a8fd0ef16bc831421abd374 /py/showbc.c | |
parent | cd35dd9d9a29836906acdce60c931f6352b536d0 (diff) |
py/showbc: Fix off-by-one when showing address of unknown opcode.
Diffstat (limited to 'py/showbc.c')
-rw-r--r-- | py/showbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/showbc.c b/py/showbc.c index b9024b716..8b97c8def 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -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; } |