commit | 0379b55ab036921eaee96f07385d2329d8de97fd | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Sat Feb 22 17:34:09 2014 +0000 |
committer | Damien George <damien.p.george@gmail.com> | Sat Feb 22 17:34:09 2014 +0000 |
tree | 881478b9ebcb231026161046d22d23e31e7e771d | |
parent | b25ef4db3b138c47b495bc3299b45a2ac966cf67 [diff] [blame] |
py: Fix casting and printing of small int.
diff --git a/py/objint.c b/py/objint.c index b33557b..775e564 100644 --- a/py/objint.c +++ b/py/objint.c
@@ -47,7 +47,7 @@ void int_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) { if (MP_OBJ_IS_SMALL_INT(self_in)) { - print(env, "%d", (int)MP_OBJ_SMALL_INT_VALUE(self_in)); + print(env, INT_FMT, MP_OBJ_SMALL_INT_VALUE(self_in)); } }