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

Function IsValidMPQHeader

Source/mpqapi.cpp:295–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool IsValidMPQHeader(const Archive &archive, _FILEHEADER *hdr)
296{
297 return hdr->signature == '\x1AQPM'
298 && hdr->headersize == 32
299 && hdr->version <= 0
300 && hdr->sectorsizeid == 3
301 && hdr->filesize == archive.size
302 && hdr->hashoffset == kMpqHashEntryOffset
303 && hdr->blockoffset == sizeof(_FILEHEADER)
304 && hdr->hashcount == 2048
305 && hdr->blockcount == 2048;
306}
307
308bool ReadMPQHeader(Archive *archive, _FILEHEADER *hdr)
309{

Callers 1

ReadMPQHeaderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected