modstruct: Use proper int accessor which checks input value type.

This commit is contained in:
Paul Sokolovsky 2014-04-19 22:45:19 +03:00
parent 53775026e7
commit 4e4fa94c4c
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **
#if MP_ENDIANNESS_BIG #if MP_ENDIANNESS_BIG
#error Not implemented #error Not implemented
#endif #endif
machine_int_t val = mp_obj_int_get_checked(val_in); machine_int_t val = mp_obj_get_int(val_in);
byte *in = (byte*)&val; byte *in = (byte*)&val;
int in_delta, out_delta; int in_delta, out_delta;
uint val_sz = MIN(size, sizeof(val)); uint val_sz = MIN(size, sizeof(val));