Import Cobalt 24.master.0.1032339
diff --git a/third_party/musl/src/stdio/__stdio_exit.c b/third_party/musl/src/stdio/__stdio_exit.c
index 5741070..a5e42c6 100644
--- a/third_party/musl/src/stdio/__stdio_exit.c
+++ b/third_party/musl/src/stdio/__stdio_exit.c
@@ -9,8 +9,8 @@
 {
 	if (!f) return;
 	FFINALLOCK(f);
-	if (f->wpos > f->wbase) f->write(f, 0, 0);
-	if (f->rpos < f->rend) f->seek(f, f->rpos-f->rend, SEEK_CUR);
+	if (f->wpos != f->wbase) f->write(f, 0, 0);
+	if (f->rpos != f->rend) f->seek(f, f->rpos-f->rend, SEEK_CUR);
 }
 
 void __stdio_exit(void)