aboutsummaryrefslogtreecommitdiff
path: root/extmod/moductypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moductypes.c')
-rw-r--r--extmod/moductypes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 5446f7b8f..c846747d5 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -360,9 +360,9 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
return mp_obj_new_int_from_ll(((int64_t *)p)[index]);
#if MICROPY_PY_BUILTINS_FLOAT
case FLOAT32:
- return mp_obj_new_float(((float *)p)[index]);
+ return mp_obj_new_float((mp_float_t)((float *)p)[index]);
case FLOAT64:
- return mp_obj_new_float(((double *)p)[index]);
+ return mp_obj_new_float((mp_float_t)((double *)p)[index]);
#endif
default:
assert(0);