bug fix
authorceriel <none@none>
Wed, 28 Jan 1987 14:38:38 +0000 (14:38 +0000)
committerceriel <none@none>
Wed, 28 Jan 1987 14:38:38 +0000 (14:38 +0000)
lang/cem/libcc/stdio/fflush.c

index 9a271fb..103ae85 100644 (file)
@@ -6,7 +6,9 @@ FILE *iop;
 {
        int count, c1;
 
-       if ( io_testflag(iop,IO_UNBUFF) || !io_testflag(iop,IO_WRITEMODE) ) 
+       if (!iop->_buf ||
+           io_testflag(iop,IO_UNBUFF) ||
+           !io_testflag(iop,IO_WRITEMODE) ) 
                return(0);
 
        count = BUFSIZ - iop->_count;