diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/stdlib/print.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdlib/print.c b/src/stdlib/print.c index 7da1343f..71ad4750 100644 --- a/src/stdlib/print.c +++ b/src/stdlib/print.c @@ -14,6 +14,7 @@ int _print_int(FILE *f, int64_t n) { char buf[21] = {[20] = 0}; // Big enough for INT64_MIN + '\0' char *p = &buf[19]; bool negative = n < 0; + if (negative) n = -n; do { *(p--) = '0' + (n % 10); |
