projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix behavior of printf with alt-form octal, zero precision, zero value
[musl]
/
src
/
stdio
/
vfprintf.c
diff --git
a/src/stdio/vfprintf.c
b/src/stdio/vfprintf.c
index
ea25772
..
39c1e86
100644
(file)
--- a/
src/stdio/vfprintf.c
+++ b/
src/stdio/vfprintf.c
@@
-570,7
+570,7
@@
static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
if (0) {
case 'o':
a = fmt_o(arg.i, z);
- if ((fl&ALT_FORM) &&
arg.i) prefix+=5, pl=
1;
+ if ((fl&ALT_FORM) &&
p<z-a+1) p=z-a+
1;
} if (0) {
case 'd': case 'i':
pl=1;