From 93c96c23a18276782e29a46e4c238e011f58579e Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 11 May 2022 12:38:05 -0400 Subject: [PATCH] Corrected an error in the new zlib GDS reading code that missed changing the "rewind" function to "gzrewind", causing a crash when a GDS file has to be re-read due to out-of-order contents. --- VERSION | 2 +- calma/CalmaRdcl.c | 2 +- calma/calmaInt.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 7f32e08b..6bd47844 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.301 +8.3.302 diff --git a/calma/CalmaRdcl.c b/calma/CalmaRdcl.c index 1966dc8c..3ca1d61c 100644 --- a/calma/CalmaRdcl.c +++ b/calma/CalmaRdcl.c @@ -142,7 +142,7 @@ calmaSetPosition(sname) if (originalPos != 0) { - rewind(calmaInputFile); + REWIND(calmaInputFile); CalmaRewound = TRUE; calmaSetPosition(sname); if (!CalmaPostOrder) diff --git a/calma/calmaInt.h b/calma/calmaInt.h index 7f281007..d3be62ef 100644 --- a/calma/calmaInt.h +++ b/calma/calmaInt.h @@ -148,6 +148,7 @@ typedef enum { LABEL_TYPE_NONE, LABEL_TYPE_TEXT, LABEL_TYPE_PORT, LABEL_TYPE_CEL #define FEOF gzeof #define FSEEK gzseek #define FTELL gztell + #define REWIND gzrewind #define FILETYPE gzFile #define OFFTYPE z_off_t #else @@ -158,6 +159,7 @@ typedef enum { LABEL_TYPE_NONE, LABEL_TYPE_TEXT, LABEL_TYPE_PORT, LABEL_TYPE_CEL #define FEOF feof #define FSEEK fseek #define FTELL ftello + #define REWIND rewind #define FILETYPE FILE * #define OFFTYPE off_t #endif