diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-18 15:53:50 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-01-18 15:53:50 +0000 |
commit | 55715fe403c5ba2262a54937c835543dd76e3907 (patch) | |
tree | fe533499f274f2c73a85967de950e8372e5f721d /code/qcommon/files.c | |
parent | 4ef1ef83efae4e977f9e83b5fcd60191d476fe31 (diff) | |
download | ioquake3-aero-55715fe403c5ba2262a54937c835543dd76e3907.tar.gz ioquake3-aero-55715fe403c5ba2262a54937c835543dd76e3907.zip |
* Yet another MD4 implementation
* Removed Com_BlockChecksumkey and replaced its functionality in the calling
function
git-svn-id: svn://svn.icculus.org/quake3/trunk@504 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/files.c')
-rw-r--r-- | code/qcommon/files.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 3602f81..a4fa79d 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -1739,7 +1739,8 @@ static pack_t *FS_LoadZipFile( char *zipfile, const char *basename ) buildBuffer = Z_Malloc( (gi.number_entry * sizeof( fileInPack_t )) + len ); namePtr = ((char *) buildBuffer) + gi.number_entry * sizeof( fileInPack_t ); - fs_headerLongs = Z_Malloc( gi.number_entry * sizeof(int) ); + fs_headerLongs = Z_Malloc( ( gi.number_entry + 1 ) * sizeof(int) ); + fs_headerLongs[ fs_numHeaderLongs++ ] = LittleLong( fs_checksumFeed ); // get the hash table size from the number of files in the zip // because lots of custom pk3 files have less than 32 or 64 files @@ -1790,8 +1791,8 @@ static pack_t *FS_LoadZipFile( char *zipfile, const char *basename ) unzGoToNextFile(uf); } - pack->checksum = Com_BlockChecksum( fs_headerLongs, 4 * fs_numHeaderLongs ); - pack->pure_checksum = Com_BlockChecksumKey( fs_headerLongs, 4 * fs_numHeaderLongs, LittleLong(fs_checksumFeed) ); + pack->checksum = Com_BlockChecksum( &fs_headerLongs[ 1 ], 4 * ( fs_numHeaderLongs - 1 ) ); + pack->pure_checksum = Com_BlockChecksum( fs_headerLongs, 4 * fs_numHeaderLongs ); pack->checksum = LittleLong( pack->checksum ); pack->pure_checksum = LittleLong( pack->pure_checksum ); |