diff options
author | James Addison <jay@jp-hosting.net> | 2023-11-17 16:01:30 +0000 |
---|---|---|
committer | James Addison <jay@jp-hosting.net> | 2023-11-17 16:26:36 +0000 |
commit | c3407c59a11274efb3e137361a5e3fceb25a88ea (patch) | |
tree | f34d193294deeef770565df979ed8db458d41b89 /src/minizip/zip.c | |
parent | b84e710a29c07b8e0a9cda37e728bf40d36e9071 (diff) |
Manually re-apply diff: zip.c
Diffstat (limited to 'src/minizip/zip.c')
-rw-r--r-- | src/minizip/zip.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/minizip/zip.c b/src/minizip/zip.c index 3d3d4ca..91dbe75 100644 --- a/src/minizip/zip.c +++ b/src/minizip/zip.c @@ -1401,7 +1401,7 @@ extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf, unsigned i else #endif { - zi->ci.stream.next_in = (Bytef*)(uintptr_t)buf; + zi->ci.stream.next_in = buf; zi->ci.stream.avail_in = len; while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) @@ -1819,6 +1819,18 @@ local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) { return err; } +extern int ZEXPORT zipFlush (zipFile file) +{ + zip64_internal* zi; + + if (file == NULL) + return ZIP_PARAMERROR; + + zi = (zip64_internal*)file; + + return ZFLUSH64(zi->z_filefunc,zi->filestream); +} + extern int ZEXPORT zipClose(zipFile file, const char* global_comment) { zip64_internal* zi; int err = 0; |