diff options
Diffstat (limited to 'py/binary.c')
-rw-r--r-- | py/binary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/binary.c b/py/binary.c index a53b8847cc..d0f72ec23c 100644 --- a/py/binary.c +++ b/py/binary.c @@ -419,10 +419,10 @@ void mp_binary_set_val_array_from_int(char typecode, void *p, size_t index, mp_i #endif #if MICROPY_PY_BUILTINS_FLOAT case 'f': - ((float *)p)[index] = val; + ((float *)p)[index] = (float)val; break; case 'd': - ((double *)p)[index] = val; + ((double *)p)[index] = (double)val; break; #endif // Extension to CPython: array of pointers |