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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user