diff options
author | Damien George <damien.p.george@gmail.com> | 2017-03-15 17:25:12 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-03-15 17:25:12 +1100 |
commit | d65371538d8ecdc64691f1c522b5b9ecc1299c7f (patch) | |
tree | 8a3b29ad75a4b9dc2fbbef6a933c137c1d2d96d9 /py | |
parent | 8cd4911e636092b25dbb6817e67a008d3faeeda9 (diff) | |
download | micropython-d65371538d8ecdc64691f1c522b5b9ecc1299c7f.tar.gz micropython-d65371538d8ecdc64691f1c522b5b9ecc1299c7f.zip |
py/mpprint: Fix int formatting so "+" is printed for 0-valued integer.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpprint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpprint.c b/py/mpprint.c index 72d1c55ca0..4bc45fef4d 100644 --- a/py/mpprint.c +++ b/py/mpprint.c @@ -222,7 +222,7 @@ int mp_print_mp_int(const mp_print_t *print, mp_obj_t x, int base, int base_char char prefix_buf[4]; char *prefix = prefix_buf; - if (mp_obj_int_sign(x) > 0) { + if (mp_obj_int_sign(x) >= 0) { if (flags & PF_FLAG_SHOW_SIGN) { *prefix++ = '+'; } else if (flags & PF_FLAG_SPACE_SIGN) { |