Commit patch from Jacques Boscq, which will prohibit the calling of memcpy with src=dest

This commit is contained in:
Thilo Schulz committed 2008-03-25 21:45:20 +00:00
1 parent bb47026b5f
commit 99fe055931
1 file changed
+4 -2
+4 -2
View File
@@ -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