Skip to content

Commit

Permalink
29/31.2 don't actually exist, this logic is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeFZ committed Nov 14, 2024
1 parent 97cbf24 commit d43157c
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions Il2CppInspector.Common/IL2CPP/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,25 +195,6 @@ private void Initialize()
Header.AttributeDataRangeSize / Sizeof<Il2CppCustomAttributeDataRange>());
}

if (Version is 29 or 31)
{
// 29.2/31.2 added a new isUnmanagedCallersOnly flag to Il2CppMethodDefinition.
// This offsets all subsequent entries by one - we can detect this by checking the
// top token byte (which should always be 0x06).

if (Methods.Length >= 2)
{
var secondToken = Methods[1].token;
if (secondToken >> 24 != 0x6)
{
Version += 0.2;

Methods = ReadArray<Il2CppMethodDefinition>(Header.methodsOffset,
Header.methodsCount / Sizeof(typeof(Il2CppMethodDefinition)));
}
}
}

// Get all metadata strings
var pluginGetStringsResult = PluginHooks.GetStrings(this);
if (pluginGetStringsResult.IsDataModified && !pluginGetStringsResult.IsInvalid)
Expand Down

0 comments on commit d43157c

Please sign in to comment.