Skip to content

Commit 4e4fa94

Browse files
committed
modstruct: Use proper int accessor which checks input value type.
1 parent 5377502 commit 4e4fa94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/binary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **
156156
#if MP_ENDIANNESS_BIG
157157
#error Not implemented
158158
#endif
159-
machine_int_t val = mp_obj_int_get_checked(val_in);
159+
machine_int_t val = mp_obj_get_int(val_in);
160160
byte *in = (byte*)&val;
161161
int in_delta, out_delta;
162162
uint val_sz = MIN(size, sizeof(val));

0 commit comments

Comments
 (0)