Skip to content
Snippets Groups Projects
Commit eb2d5f11 authored by Armin Luntzer's avatar Armin Luntzer
Browse files

vsnprintf: restructure loop, so values == 0 are printed as well

parent a9c20d2c
No related branches found
No related tags found
No related merge requests found
...@@ -555,7 +555,7 @@ static size_t render_xlong_to_ascii(bool usign, long value, char *str, ...@@ -555,7 +555,7 @@ static size_t render_xlong_to_ascii(bool usign, long value, char *str,
} }
} }
while (value && (n < STACK_BUF_SIZE)) { do {
digit = (char) (value % spec->base); digit = (char) (value % spec->base);
...@@ -572,7 +572,7 @@ static size_t render_xlong_to_ascii(bool usign, long value, char *str, ...@@ -572,7 +572,7 @@ static size_t render_xlong_to_ascii(bool usign, long value, char *str,
n++; n++;
value /= spec->base; value /= spec->base;
} } while (value && (n < STACK_BUF_SIZE));
return render_final(str, end, sign, buf, n, spec); return render_final(str, end, sign, buf, n, spec);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment