fernly: Fix printf("%d") > 99999
This adds lots of divison code, which fixes, among other things, calling printf() with %d greater than 99999.
This commit is contained in:
parent
05532408dc
commit
1c3ef737bf
5 changed files with 245 additions and 22 deletions
|
@ -251,7 +251,7 @@ static noinline char* put_dec(char *buf, unsigned NUM_TYPE num)
|
|||
unsigned rem;
|
||||
if (num < 100000)
|
||||
return put_dec_trunc(buf, num);
|
||||
rem = _udiv64(num, 100000);
|
||||
rem = do_div(num, 100000);
|
||||
buf = put_dec_full(buf, rem);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue