X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fstdio%2Fvfprintf.c;h=2100eb5e5449eb73bcea71792edb0096ba68795a;hb=a43a7b215cf7b71d1371c63927c17bae7177aa95;hp=af069d133c8dacd5d7172bd3512d4c5925760344;hpb=f1791f42ef6d22e68dfc1ee45c0a478b156ce46d;p=oweals%2Fmusl.git diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index af069d13..2100eb5e 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -678,7 +678,8 @@ int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap) f->buf_size = sizeof internal_buf; f->wpos = f->wbase = f->wend = 0; } - ret = printf_core(f, fmt, &ap2, nl_arg, nl_type); + if (!f->wend && __towrite(f)) ret = -1; + else ret = printf_core(f, fmt, &ap2, nl_arg, nl_type); if (saved_buf) { f->write(f, 0, 0); if (!f->wpos) ret = -1;