Add check for header size

This commit is contained in:
Harry Cheng 2024-06-10 22:55:47 +08:00
parent 217f1d4737
commit a33dc003c2

View file

@ -58,6 +58,10 @@ namespace Il2CppDumper
} }
Version = version; Version = version;
header = ReadClass<Il2CppGlobalMetadataHeader>(0); header = ReadClass<Il2CppGlobalMetadataHeader>(0);
if (stream.Position != header.stringLiteralOffset)
{
Console.WriteLine($"WARNING: Metadata header size does not match declared version {version}, version might be incorrect.");
}
if (version == 24) if (version == 24)
{ {
if (header.stringLiteralOffset == 264) if (header.stringLiteralOffset == 264)