防傻瓜提示

This commit is contained in:
Perfare 2022-04-22 09:52:25 +08:00
parent 6499cf5439
commit e6b1f1f4c0

View file

@ -48,6 +48,10 @@ namespace Il2CppDumper
throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file.");
}
var version = ReadInt32();
if (version < 0 || version > 1000)
{
throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file.");
}
if (version < 16 || version > 29)
{
throw new NotSupportedException($"ERROR: Metadata file supplied is not a supported version[{version}].");