diff options
| author | Jeff Epler <jepler@gmail.com> | 2025-08-15 08:47:39 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-08-28 11:31:03 +1000 |
| commit | 1671977ca4be609679db36abc5594f1d76a71e23 (patch) | |
| tree | 4198bdda9dfbfa15fe34607729f419f5e0ad51da /py/objint.c | |
| parent | f4f7fbf3dc8164ead907cb418773eef9bbba5644 (diff) | |
py/parsenum: Fix parsing LLONG_MIN in longlong configuration.
Re-organize `mp_parse_num_integer()` (for longlong) slightly so that the
most negative 64-bit integer can be parsed.
Fixes issue #17932.
Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'py/objint.c')
| -rw-r--r-- | py/objint.c | 2 |
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 = '-'; } |
