diff options
Diffstat (limited to 'src/kernel/lib/stdlib/itoa.c')
-rw-r--r-- | src/kernel/lib/stdlib/itoa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/lib/stdlib/itoa.c b/src/kernel/lib/stdlib/itoa.c index 2d2243a..b15befd 100644 --- a/src/kernel/lib/stdlib/itoa.c +++ b/src/kernel/lib/stdlib/itoa.c @@ -44,7 +44,7 @@ char *itoa(int n) } // TODO: Rename itoa_base -char *itoa_base(int value, char *result, int base) +char *itoa_base(int value, char *result, int base, int is_signed) { if (base < 2 || base > 36) { *result = '\0'; @@ -61,7 +61,7 @@ char *itoa_base(int value, char *result, int base) [35 + (tmp_value - value * base)]; } while (value); - if (tmp_value < 0) + if (is_signed && tmp_value < 0) *ptr++ = '-'; *ptr-- = '\0'; while (ptr1 < ptr) { |