summaryrefslogtreecommitdiff
path: root/py/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/binary.c')
-rw-r--r--py/binary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/binary.c b/py/binary.c
index bb334ed3d..4f02525d7 100644
--- a/py/binary.c
+++ b/py/binary.c
@@ -148,7 +148,7 @@ mp_obj_t mp_binary_get_val_array(char typecode, void *p, mp_uint_t index) {
#endif
#if MICROPY_PY_BUILTINS_FLOAT
case 'f':
- return mp_obj_new_float((mp_float_t)((float*)p)[index]);
+ return mp_obj_new_float(((float*)p)[index]);
case 'd':
return mp_obj_new_float(((double*)p)[index]);
#endif
@@ -213,7 +213,7 @@ mp_obj_t mp_binary_get_val(char struct_type, char val_type, byte **ptr) {
#if MICROPY_NONSTANDARD_TYPECODES
} else if (val_type == 'S') {
const char *s_val = (const char*)(uintptr_t)(mp_uint_t)val;
- return mp_obj_new_str(s_val, strlen(s_val), false);
+ return mp_obj_new_str(s_val, strlen(s_val));
#endif
#if MICROPY_PY_BUILTINS_FLOAT
} else if (val_type == 'f') {