mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
[3.x] Fix unzSeekCurrentFile not resetting total_out_64.
This commit is contained in:
parent
c548b21132
commit
daf23fd4c6
2 changed files with 5 additions and 1 deletions
4
thirdparty/minizip/patches/godot-seek.patch
vendored
4
thirdparty/minizip/patches/godot-seek.patch
vendored
|
@ -145,7 +145,7 @@ index ea05b7d62a..981ba3c0cb 100644
|
|||
|
||||
s->pfile_in_zip_read = pfile_in_zip_read_info;
|
||||
s->encrypted = 0;
|
||||
@@ -1510,6 +1544,85 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
|
||||
@@ -1510,6 +1544,87 @@ extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,7 @@ index ea05b7d62a..981ba3c0cb 100644
|
|||
+ pfile_in_zip_read_info->extra_size + pos;
|
||||
+
|
||||
+ pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
||||
+ pfile_in_zip_read_info->total_out_64 = pos;
|
||||
+ pfile_in_zip_read_info->stream.total_out = pos;
|
||||
+
|
||||
+ return ZSEEK64(pfile_in_zip_read_info->z_filefunc,
|
||||
|
@ -202,6 +203,7 @@ index ea05b7d62a..981ba3c0cb 100644
|
|||
+
|
||||
+ pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
||||
+ pfile_in_zip_read_info->stream.total_out = 0;
|
||||
+ pfile_in_zip_read_info->total_out_64 = 0;
|
||||
+ pfile_in_zip_read_info->stream.next_in = 0;
|
||||
+ }
|
||||
+
|
||||
|
|
2
thirdparty/minizip/unzip.c
vendored
2
thirdparty/minizip/unzip.c
vendored
|
@ -1573,6 +1573,7 @@ extern int ZEXPORT unzSeekCurrentFile(unzFile file, int pos) {
|
|||
pfile_in_zip_read_info->extra_size + pos;
|
||||
|
||||
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
||||
pfile_in_zip_read_info->total_out_64 = pos;
|
||||
pfile_in_zip_read_info->stream.total_out = pos;
|
||||
|
||||
return ZSEEK64(pfile_in_zip_read_info->z_filefunc,
|
||||
|
@ -1597,6 +1598,7 @@ extern int ZEXPORT unzSeekCurrentFile(unzFile file, int pos) {
|
|||
|
||||
pfile_in_zip_read_info->stream.avail_in = (uInt)0;
|
||||
pfile_in_zip_read_info->stream.total_out = 0;
|
||||
pfile_in_zip_read_info->total_out_64 = 0;
|
||||
pfile_in_zip_read_info->stream.next_in = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue