summaryrefslogtreecommitdiffstats
path: root/lib/libc-headless/stdio/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc-headless/stdio/sprintf.c')
-rw-r--r--lib/libc-headless/stdio/sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc-headless/stdio/sprintf.c b/lib/libc-headless/stdio/sprintf.c
index 2881bd5..dd78572 100644
--- a/lib/libc-headless/stdio/sprintf.c
+++ b/lib/libc-headless/stdio/sprintf.c
@@ -108,7 +108,7 @@ conversion_int:
for(uintmax_t v = value, i = numc - 1; v != 0; v /= radix, i--) {
if(written + i >= size) continue;
int digit = v % radix;
- char c = digit > 10 ? (digit + 'a' - 10) : (digit + '0');
+ char c = digit >= 10 ? (digit + 'a' - 10) : (digit + '0');
if(is_caps) c = toupper(c);
str[written + i] = c;
}