mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
sys: fmt: fix converting "0" in fmt_u32_dec()
This commit is contained in:
parent
810c623092
commit
8c6f373b98
@ -93,10 +93,9 @@ size_t fmt_u32_dec(char *out, uint32_t val)
|
||||
|
||||
if (out) {
|
||||
char *ptr = out + len;
|
||||
while(val) {
|
||||
do {
|
||||
*--ptr = (val % 10) + '0';
|
||||
val /= 10;
|
||||
}
|
||||
} while ((val /= 10));
|
||||
}
|
||||
|
||||
return len;
|
||||
|
Loading…
Reference in New Issue
Block a user