sys: fmt: fix converting "0" in fmt_u32_dec()

This commit is contained in:
Kaspar Schleiser 2015-12-07 16:42:39 +01:00
parent 810c623092
commit 8c6f373b98

View File

@ -93,10 +93,9 @@ size_t fmt_u32_dec(char *out, uint32_t val)
if (out) { if (out) {
char *ptr = out + len; char *ptr = out + len;
while(val) { do {
*--ptr = (val % 10) + '0'; *--ptr = (val % 10) + '0';
val /= 10; } while ((val /= 10));
}
} }
return len; return len;