diff options
-rw-r--r-- | code/qcommon/files.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c index ba50222..5e001ed 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -1092,8 +1092,10 @@ int FS_FOpenFileRead( const char *filename, fileHandle_t *file, qboolean uniqueF temp = zfi->file; // set the file position in the zip file (also sets the current file info) unzSetCurrentFileInfoPosition(pak->handle, pakFile->pos); - // copy the file info into the unzip structure - Com_Memcpy( zfi, pak->handle, sizeof(unz_s) ); + if ( zfi != pak->handle ) { + // copy the file info into the unzip structure + Com_Memcpy( zfi, pak->handle, sizeof(unz_s) ); + } // we copy this back into the structure zfi->file = temp; // open the file in the zip |