diff --git a/src/stdio/ext.c b/src/stdio/ext.c index d5a403b6a03abb4a860398958f741057dd0ed0f4..6b8ce91c5eb2a9fca45a8a9771ccea99452b5152 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)