Skip to content

Commit

Permalink
Corrected an error in the new zlib GDS reading code that missed
Browse files Browse the repository at this point in the history
changing the "rewind" function to "gzrewind", causing a crash when
a GDS file has to be re-read due to out-of-order contents.
  • Loading branch information
RTimothyEdwards committed May 11, 2022
1 parent 250d811 commit 93c96c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.301
8.3.302
2 changes: 1 addition & 1 deletion calma/CalmaRdcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ calmaSetPosition(sname)

if (originalPos != 0)
{
rewind(calmaInputFile);
REWIND(calmaInputFile);
CalmaRewound = TRUE;
calmaSetPosition(sname);
if (!CalmaPostOrder)
Expand Down
2 changes: 2 additions & 0 deletions calma/calmaInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 93c96c2

Please sign in to comment.