diff options
Diffstat (limited to 'py/objint_mpz.c')
| -rw-r--r-- | py/objint_mpz.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 2811bcf2a..e9545149f 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -296,8 +296,7 @@ mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_i mpz_pow_inpl(&res->mpz, zlhs, zrhs); break; - default: { - assert(op == MP_BINARY_OP_DIVMOD); + case MP_BINARY_OP_DIVMOD: { if (mpz_is_zero(zrhs)) { goto zero_division_error; } @@ -306,6 +305,9 @@ mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_i mp_obj_t tuple[2] = {MP_OBJ_FROM_PTR(quo), MP_OBJ_FROM_PTR(res)}; return mp_obj_new_tuple(2, tuple); } + + default: + return MP_OBJ_NULL; // op not supported } return MP_OBJ_FROM_PTR(res); |
