ceriel 37 年之前
父節點
當前提交
2840140786
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lang/cem/libcc/stdio/fflush.c

+ 3 - 1
lang/cem/libcc/stdio/fflush.c

@@ -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;