r1278 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Mar 25 17:45:20 EDT 2008
Author: thilo
Date: 2008-03-25 17:45:20 -0400 (Tue, 25 Mar 2008)
New Revision: 1278
Modified:
trunk/code/qcommon/files.c
Log:
Commit patch from Jacques Boscq, which will prohibit the calling of memcpy with src=dest
Modified: trunk/code/qcommon/files.c
===================================================================
--- trunk/code/qcommon/files.c 2008-03-25 21:36:09 UTC (rev 1277)
+++ trunk/code/qcommon/files.c 2008-03-25 21:45:20 UTC (rev 1278)
@@ -1092,8 +1092,10 @@
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
More information about the quake3-commits
mailing list