IL2CPP: Don't crash on assemblies with zero attributes (issue #19)

This commit is contained in:
Katy Coe
2020-02-10 08:44:43 +01:00
parent 3b62a44426
commit 46bf6f2413

View File

@@ -226,7 +226,8 @@ namespace Il2CppInspector
var token = AttributeTypeRanges[index].token;
attsByToken.Add(token, index);
}
AttributeIndicesByToken.Add(image.customAttributeStart, attsByToken);
if (image.customAttributeCount > 0)
AttributeIndicesByToken.Add(image.customAttributeStart, attsByToken);
}
}