Fix incorrect if condition in GetVTable causing them to all be empty

This commit is contained in:
Luke
2024-11-19 00:13:26 +01:00
committed by GitHub
parent 5254c4b85a
commit 8403f8a62d

View File

@@ -255,7 +255,7 @@ namespace Il2CppInspector.Reflection
public PropertyInfo GetProperty(string name) => DeclaredProperties.FirstOrDefault(p => p.Name == name); public PropertyInfo GetProperty(string name) => DeclaredProperties.FirstOrDefault(p => p.Name == name);
public MethodBase[] GetVTable() { public MethodBase[] GetVTable() {
if (!Definition.IsValid) { if (Definition.IsValid) {
MetadataUsage[] vt = Assembly.Model.Package.GetVTable(Definition); MetadataUsage[] vt = Assembly.Model.Package.GetVTable(Definition);
MethodBase[] res = new MethodBase[vt.Length]; MethodBase[] res = new MethodBase[vt.Length];
for (int i = 0; i < vt.Length; i++) { for (int i = 0; i < vt.Length; i++) {