summaryrefslogtreecommitdiff
path: root/py/objint.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objint.c b/py/objint.c
index 87d8a2785..fd9ab106f 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -247,7 +247,7 @@ char *mp_obj_int_formatted(char **buf, size_t *buf_size, size_t *fmt_size, mp_co
char sign = '\0';
if (num < 0) {
- num = -num;
+ num = -(fmt_uint_t)num;
sign = '-';
}