From 2840140786d5d70f351fe84b1774c160d424dcf3 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 28 Jan 1987 14:38:38 +0000 Subject: [PATCH] bug fix --- lang/cem/libcc/stdio/fflush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/cem/libcc/stdio/fflush.c b/lang/cem/libcc/stdio/fflush.c index 9a271fb9..103ae85e 100644 --- a/lang/cem/libcc/stdio/fflush.c +++ b/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;