CrystalMpq.MpqFileStream.TestPatchHeader C# (CSharp) Method

TestPatchHeader() private static method

private static TestPatchHeader ( MpqArchive archive, long offset ) : bool
archive MpqArchive
offset long
return bool
        private static unsafe bool TestPatchHeader(MpqArchive archive, long offset)
        {
            var sharedBuffer = CommonMethods.GetSharedBuffer(4);

            if (archive.ReadArchiveData(sharedBuffer, 0, offset, 4) != 4) throw new EndOfStreamException();

            return sharedBuffer[0] == 0x50 && sharedBuffer[1] == 0x54 && sharedBuffer[2] == 0x43 && sharedBuffer[3] == 0x48;
        }