author | Rich Felker <dalias@aerifal.cx> | 2018年08月29日 23:45:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018年08月29日 23:45:43 -0400 |
commit | f1791f42ef6d22e68dfc1ee45c0a478b156ce46d (patch) | |
tree | d3b784e175e9b701e2f25213070b4ae7251e21e8 /src/stdio/vfprintf.c | |
parent | ddc947eda311331959c73dbc4491afcfe2326346 (diff) | |
download | musl-f1791f42ef6d22e68dfc1ee45c0a478b156ce46d.tar.gz |
-rw-r--r-- | src/stdio/vfprintf.c | 4 |
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 5e7be717..af069d13 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -674,9 +674,9 @@ int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap) if (f->mode < 1) f->flags &= ~F_ERR; if (!f->buf_size) { saved_buf = f->buf; - f->wpos = f->wbase = f->buf = internal_buf; + f->buf = internal_buf; f->buf_size = sizeof internal_buf; - f->wend = internal_buf + sizeof internal_buf; + f->wpos = f->wbase = f->wend = 0; } ret = printf_core(f, fmt, &ap2, nl_arg, nl_type); if (saved_buf) { |