about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/ext.c2
1 files changed, 1 insertions, 1 deletions
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)