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.
This commit is contained in:
Tim Edwards 2022-05-11 12:38:05 -04:00
parent 250d811fc5
commit 93c96c23a1
3 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
8.3.301
8.3.302

View File

@ -142,7 +142,7 @@ calmaSetPosition(sname)
if (originalPos != 0)
{
rewind(calmaInputFile);
REWIND(calmaInputFile);
CalmaRewound = TRUE;
calmaSetPosition(sname);
if (!CalmaPostOrder)

View File

@ -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