* Yet another MD4 implementation

* Removed Com_BlockChecksumkey and replaced its functionality in the calling
  function
This commit is contained in:
Tim Angus 2006-01-18 15:53:50 +00:00
parent 0856744622
commit 6a396f761f
3 changed files with 188 additions and 199 deletions

View file

@ -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 );