From 757ecbfcfd6deea9c9be0b1d9953b385cab04459 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 9 Sep 1998 16:24:04 +0000 Subject: [PATCH] Fixed a bug in the handling of exclude files which was causing a crash by calling fclose() on an invalid file handle. --- DEM/dem.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DEM/dem.cxx b/DEM/dem.cxx index 13bd4ea0b..21e8ebc1d 100644 --- a/DEM/dem.cxx +++ b/DEM/dem.cxx @@ -774,8 +774,8 @@ void fgDEM::outputmesh_output_nodes( char *fg_root, fgBUCKET *p ) { printf("(extra) %d %.2f %.2f %.2f\n", i, exnodes[i][0], exnodes[i][1], exnodes[i][2]); } + fclose(fd); } - fclose(fd); printf("Creating node file: %s\n", file); fd = fopen(file, "w"); @@ -825,6 +825,10 @@ fgDEM::~fgDEM( void ) { // $Log$ +// Revision 1.13 1998/09/09 16:24:04 curt +// Fixed a bug in the handling of exclude files which was causing +// a crash by calling fclose() on an invalid file handle. +// // Revision 1.12 1998/08/24 20:03:31 curt // Eliminated a possible memory overrun error. // Use the proper free() rather than the incorrect delete(). -- 2.39.2