summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stdio/ext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdio/ext.c b/src/stdio/ext.c
index 6b8ce91c..1fd95490 100644
--- a/src/stdio/ext.c
+++ b/src/stdio/ext.c
@@ -14,12 +14,12 @@ int __fsetlocking(FILE *f, int type)
int __fwriting(FILE *f)
{
- return f->wend && f->wpos > f->wbase;
+ return (f->flags & F_NORD) || f->wend;
}
int __freading(FILE *f)
{
- return f->rend > f->rpos;
+ return (f->flags & F_NOWR) || f->rend;
}
int __freadable(FILE *f)