From e5cb55fedd811f71cd91ef097a8a4a4964d8c564 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 30 Jun 2011 13:27:08 -0400 Subject: [PATCH] fix logic in __fwriting --- src/stdio/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdio/ext.c b/src/stdio/ext.c index d5a403b6..6b8ce91c 100644 --- a/src/stdio/ext.c +++ b/src/stdio/ext.c @@ -14,7 +14,7 @@ int __fsetlocking(FILE *f, int type) int __fwriting(FILE *f) { - return f->wend > f->wpos; + return f->wend && f->wpos > f->wbase; } int __freading(FILE *f) -- 2.25.1