extmod/moductypes: Fix bigint handling for 32-bit ports.

This commit is contained in:
Paul Sokolovsky
2017-04-21 16:40:57 +03:00
parent 3e5cd35a9f
commit 9e8f316392
4 changed files with 67 additions and 1 deletions

View File

@@ -360,7 +360,7 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) {
return;
}
#endif
mp_int_t v = mp_obj_get_int(val);
mp_int_t v = mp_obj_get_int_truncated(val);
switch (val_type) {
case UINT8:
((uint8_t*)p)[index] = (uint8_t)v; return;