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

pull/511/merge
Paul Sokolovsky 2014-04-19 22:45:19 +03:00
rodzic 53775026e7
commit 4e4fa94c4c
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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
#error Not implemented
#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;
int in_delta, out_delta;
uint val_sz = MIN(size, sizeof(val));