MCPcopy Create free account
hub / github.com/diasurgical/devilution / IsValidHashEntry

Function IsValidHashEntry

3rdParty/StormLib/src/SBaseFileTable.cpp:583–588  ·  view source on GitHub ↗

Hash entry verification when the file table does not exist yet

Source from the content-addressed store, hash-verified

581
582// Hash entry verification when the file table does not exist yet
583bool IsValidHashEntry(TMPQArchive * ha, TMPQHash * pHash)
584{
585 TFileEntry * pFileEntry = ha->pFileTable + MPQ_BLOCK_INDEX(pHash);
586
587 return ((MPQ_BLOCK_INDEX(pHash) < ha->dwFileTableSize) && (pFileEntry->dwFlags & MPQ_FILE_EXISTS)) ? true : false;
588}
589
590// Hash entry verification when the file table does not exist yet
591static bool IsValidHashEntry1(TMPQArchive * ha, TMPQHash * pHash, TMPQBlock * pBlockTable)

Callers 2

RebuildFileTableFunction · 0.85
DoMPQSearch_HashTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected