Fossil SCM

Changed zlib crc type from int to unsigned long, as that's the type returned by zlib's crc32() and doing so reportedly resolves the CRC error reported in [forum:7a9097e557 | forum post 7a9097e557].

stephan 2022-04-20 09:38 trunk
Commit 1bf6686e76252efda0abf7c64da8d5abb61c663187016ff77c4ac3f774988fc6
2 files changed +1 -1 +1 -1
+1 -1
--- src/gzip.c
+++ src/gzip.c
@@ -29,11 +29,11 @@
2929
/*
3030
** State information for the GZIP file under construction.
3131
*/
3232
struct gzip_state {
3333
int eState; /* 0: idle 1: header 2: compressing */
34
- int iCRC; /* The checksum */
34
+ unsigned long iCRC; /* The checksum */
3535
z_stream stream; /* The working compressor */
3636
Blob out; /* Results stored here */
3737
} gzip;
3838
3939
/*
4040
--- src/gzip.c
+++ src/gzip.c
@@ -29,11 +29,11 @@
29 /*
30 ** State information for the GZIP file under construction.
31 */
32 struct gzip_state {
33 int eState; /* 0: idle 1: header 2: compressing */
34 int iCRC; /* The checksum */
35 z_stream stream; /* The working compressor */
36 Blob out; /* Results stored here */
37 } gzip;
38
39 /*
40
--- src/gzip.c
+++ src/gzip.c
@@ -29,11 +29,11 @@
29 /*
30 ** State information for the GZIP file under construction.
31 */
32 struct gzip_state {
33 int eState; /* 0: idle 1: header 2: compressing */
34 unsigned long iCRC; /* The checksum */
35 z_stream stream; /* The working compressor */
36 Blob out; /* Results stored here */
37 } gzip;
38
39 /*
40
+1 -1
--- src/zip.c
+++ src/zip.c
@@ -255,11 +255,11 @@
255255
){
256256
z_stream stream;
257257
int nameLen;
258258
int toOut = 0;
259259
int iStart;
260
- int iCRC = 0;
260
+ unsigned long iCRC = 0;
261261
int nByte = 0;
262262
int nByteCompr = 0;
263263
int nBlob; /* Size of the blob */
264264
int iMethod; /* Compression method. */
265265
int iMode = 0644; /* Access permissions */
266266
--- src/zip.c
+++ src/zip.c
@@ -255,11 +255,11 @@
255 ){
256 z_stream stream;
257 int nameLen;
258 int toOut = 0;
259 int iStart;
260 int iCRC = 0;
261 int nByte = 0;
262 int nByteCompr = 0;
263 int nBlob; /* Size of the blob */
264 int iMethod; /* Compression method. */
265 int iMode = 0644; /* Access permissions */
266
--- src/zip.c
+++ src/zip.c
@@ -255,11 +255,11 @@
255 ){
256 z_stream stream;
257 int nameLen;
258 int toOut = 0;
259 int iStart;
260 unsigned long iCRC = 0;
261 int nByte = 0;
262 int nByteCompr = 0;
263 int nBlob; /* Size of the blob */
264 int iMethod; /* Compression method. */
265 int iMode = 0644; /* Access permissions */
266

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button