diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-07-30 12:33:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-30 12:33:44 -0700 |
| commit | a6d94b68453b8535398ff0b61cd6c4a0c7f77f8b (patch) | |
| tree | 8defd6392975b8145dc11f0cce9c39a4e440b32a /py/binary.c | |
| parent | 433a29bb70d51abb84c77a911ced43c6ff14706e (diff) | |
| parent | b1006170f1dcfa3a9499ef31c19c8f20736b136a (diff) | |
Merge pull request #1068 from dhalbert/micropython-25ae98f-merge
Micropython 25ae98f merge
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 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') { |
