aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/files.c
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 21:45:20 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-03-25 21:45:20 +0000
commit81da888c22ab85754b82982b1ef2b49e2f289b3a (patch)
tree6f0cc3f46c86584a5dc2d331a388ca5a666f733b /code/qcommon/files.c
parentdac8a746a7f80b50834e750927335d8d1a00c1c1 (diff)
downloadioquake3-aero-81da888c22ab85754b82982b1ef2b49e2f289b3a.tar.gz
ioquake3-aero-81da888c22ab85754b82982b1ef2b49e2f289b3a.zip
Commit patch from Jacques Boscq, which will prohibit the calling of memcpy with src=dest
git-svn-id: svn://svn.icculus.org/quake3/trunk@1278 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/files.c')
-rw-r--r--code/qcommon/files.c6
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