From 9f6309fb46c698b780879ef8d453a155cfb59bbe Mon Sep 17 00:00:00 2001 From: LukeFZ <17146677+LukeFZ@users.noreply.github.com> Date: Wed, 29 Nov 2023 21:39:24 +0100 Subject: [PATCH] forgot to commit the if part --- Il2CppInspector.Common/Reflection/CustomAttributeData.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Reflection/CustomAttributeData.cs b/Il2CppInspector.Common/Reflection/CustomAttributeData.cs index 288ca64..135ef31 100644 --- a/Il2CppInspector.Common/Reflection/CustomAttributeData.cs +++ b/Il2CppInspector.Common/Reflection/CustomAttributeData.cs @@ -48,11 +48,15 @@ namespace Il2CppInspector.Reflection if (pkg.Version < 21) yield break; + if (pkg.Version < 29) + { var range = pkg.AttributeTypeRanges[customAttributeIndex]; - for (var i = range.start; i < range.start + range.count; i++) { + for (var i = range.start; i < range.start + range.count; i++) + { var typeIndex = pkg.AttributeTypeIndices[i]; - if (asm.Model.AttributesByIndices.TryGetValue(i, out var attribute)) { + if (asm.Model.AttributesByIndices.TryGetValue(i, out var attribute)) + { yield return attribute; continue; }