aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tiny-printf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 1138c7012ae..8fc7e48d994 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -242,6 +242,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
goto abort;
case 'u':
case 'd':
+ case 'i':
div = 1000000000;
if (islong) {
num = va_arg(va, unsigned long);
@@ -251,7 +252,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
num = va_arg(va, unsigned int);
}
- if (ch == 'd') {
+ if (ch != 'u') {
if (islong && (long)num < 0) {
num = -(long)num;
out(info, '-');