author | Rich Felker <dalias@aerifal.cx> | 2012年04月17日 10:58:02 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012年04月17日 10:58:02 -0400 |
commit | b5a8b28915aad17b6f49ccacd6d3fef3890844d1 (patch) | |
tree | 4e99ccfebc80ef47789e1457fa675381f6514492 /src/stdio/vfprintf.c | |
parent | cc3a4466605fe8dfc31f3b75779110ac93055bc1 (diff) | |
download | musl-b5a8b28915aad17b6f49ccacd6d3fef3890844d1.tar.gz |
-rw-r--r-- | src/stdio/vfprintf.c | 3 |
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 928c8c16..91c6b93a 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -652,8 +652,9 @@ int vfprintf(FILE *f, const char *fmt, va_list ap) FLOCK(f); if (!f->buf_size) { saved_buf = f->buf; - f->buf = internal_buf; + f->wpos = f->wbase = f->buf = internal_buf; f->buf_size = sizeof internal_buf; + f->wend = internal_buf + sizeof internal_buf; } ret = printf_core(f, fmt, &ap2, nl_arg, nl_type); if (saved_buf) { |