py/mpprint: Fix int formatting so "+" is printed for 0-valued integer.
This commit is contained in:
parent
8cd4911e63
commit
d65371538d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue