diff options
author | Damien George <damien.p.george@gmail.com> | 2016-03-14 22:40:39 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-03-14 22:40:39 +0000 |
commit | 2a1cca20b1e1a93c86c8c3a3254ab7150c85ac08 (patch) | |
tree | 1a651210327a64e9d236adc61134ffd9622b9bb7 /py/obj.c | |
parent | e7cd1699df95d201369417b36cc4b65063d5c763 (diff) | |
download | micropython-2a1cca20b1e1a93c86c8c3a3254ab7150c85ac08.tar.gz micropython-2a1cca20b1e1a93c86c8c3a3254ab7150c85ac08.zip |
py: Fix passing of some wide int types to printf varg format list.
Passing an mp_uint_t to a %d printf format is incorrect for builds where
mp_uint_t is larger than word size (eg a nanboxing build). This patch
adds some simple casting to int in these cases.
Diffstat (limited to 'py/obj.c')
-rw-r--r-- | py/obj.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -342,7 +342,7 @@ void mp_obj_get_array_fixed_n(mp_obj_t o, mp_uint_t len, mp_obj_t **items) { "tuple/list has wrong length")); } else { nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, - "requested length %d but object has length %d", len, seq_len)); + "requested length %d but object has length %d", (int)len, (int)seq_len)); } } } |