summaryrefslogtreecommitdiff
path: root/src/minizip/zip.c.diff
blob: 2b01cdf5106d9bad00debac7599237635edb76d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- zip.c.orig	2024-01-27 14:07:18.636193212 +0100
+++ zip.c	2024-01-27 14:09:59.736631926 +0100
@@ -1412,7 +1412,7 @@
     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))
@@ -1830,6 +1830,18 @@
   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;