1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 00:11:16 +01:00

Merge pull request #4426 from kaspar030/fix_fmt_u32_dec_zero_case

sys: fmt: fix converting "0" in fmt_u32_dec()
This commit is contained in:
Kaspar Schleiser 2015-12-07 22:28:32 +01:00
commit 6a473e6cc2

View File

@ -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;