Skip to content

Commit a8e60c1

Browse files
committed
objfloat: Missing default: caused incorrect results for unimplemented ops.
1 parent a96d3d0 commit a8e60c1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

py/objfloat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ mp_obj_t mp_obj_float_binary_op(int op, mp_float_t lhs_val, mp_obj_t rhs_in) {
119119
case MP_BINARY_OP_LESS_EQUAL: return MP_BOOL(lhs_val <= rhs_val);
120120
case MP_BINARY_OP_MORE_EQUAL: return MP_BOOL(lhs_val >= rhs_val);
121121

122-
return NULL; // op not supported
122+
default:
123+
return NULL; // op not supported
123124
}
124125
return mp_obj_new_float(lhs_val);
125126
}

0 commit comments

Comments
 (0)