Explorar el Código

fix logic in __fwriting

Rich Felker hace 14 años
padre
commit
e5cb55fedd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/stdio/ext.c

+ 1 - 1
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)