Upped the version number to 1.0.3+dev (ideally this should be done by whoever
[mmh] / uip / scansbr.c
index 44cbf0d..143a059 100644 (file)
@@ -353,7 +353,7 @@ finished:
     }
     *--nxtbuf = tmpbuf;
 
-    if (outnum && fclose (scnout) == EOF)
+    if (outnum && (ferror(scnout) || fclose (scnout) == EOF))
        adios (scnmsg, "write error on");
 
     return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG);