Commit 75dad625 authored by Alessandro Rubini's avatar Alessandro Rubini

pp_printf: fixed printing 0 (squash in 52d37b8)

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent cf5b69c5
...@@ -18,6 +18,8 @@ static int number(char *out, int value, int base, int lead, int wid) ...@@ -18,6 +18,8 @@ static int number(char *out, int value, int base, int lead, int wid)
tmp[--i] = hex[value % base]; tmp[--i] = hex[value % base];
value /= base; value /= base;
} }
if (i == 16)
tmp[--i] = '0';
while (i > 16 - wid) while (i > 16 - wid)
tmp[--i] = lead; tmp[--i] = lead;
ret = 16 - i; ret = 16 - i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment