Explorar o código

Fixed crash when duplicating PHYSFS_Io for zipfiles.

Ryan C. Gordon %!s(int64=8) %!d(string=hai) anos
pai
achega
f5e5b586c7
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/physfs_archiver_zip.c

+ 1 - 0
src/physfs_archiver_zip.c

@@ -455,6 +455,7 @@ static PHYSFS_Io *ZIP_duplicate(PHYSFS_Io *io)
     finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry);
     finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry);
     GOTO_IF_ERRPASS(!finfo->io, failed);
     GOTO_IF_ERRPASS(!finfo->io, failed);
 
 
+    initializeZStream(&finfo->stream);
     if (finfo->entry->compression_method != COMPMETH_NONE)
     if (finfo->entry->compression_method != COMPMETH_NONE)
     {
     {
         finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE);
         finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE);