From a41cdbd540786d9d5695b83daaa8a834aafe65d3 Mon Sep 17 00:00:00 2001 From: Tom Taxon Date: Tue, 6 Dec 2011 18:06:01 +0000 Subject: [PATCH] Added a call to fflush on the hydraulic file when it is written to because it caused issues with the subsequent use of the hydraulic file related to MSX. git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@423 c320cabd-cc23-0410-96d8-e60fbf53ed7f --- src/output.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/output.c b/src/output.c index 1578246..d614acb 100755 --- a/src/output.c +++ b/src/output.c @@ -174,6 +174,7 @@ int savehyd(long *htime) if (fwrite(x+1,sizeof(REAL4),Nlinks,HydFile) < (unsigned)Nlinks) errcode = 308; free(x); + fflush(HydFile); /* added TNT */ return(errcode); } /* End of savehyd */ @@ -193,6 +194,7 @@ int savehydstep(long *hydstep) t = *hydstep; if (fwrite(&t,sizeof(INT4),1,HydFile) < 1) errcode = 308; if (t == 0) fputc(EOFMARK, HydFile); + fflush(HydFile); /* added TNT */ return(errcode); }