Output: Fix failure to render indexer argument in some cases

This commit is contained in:
Katy Coe
2019-11-10 00:18:08 +01:00
parent 192ad0b520
commit 1c411ff12d
2 changed files with 2 additions and 2 deletions

View File

@@ -222,7 +222,7 @@ namespace Il2CppInspector
writer.Write($"{prop.Name} {{ ");
// Indexer
else
writer.Write("this[" + string.Join(", ", primary.DeclaredParameters.SkipLast(getAccess > setAccess? 0 : 1).Select(p => p.GetParameterString())) + "] { ");
writer.Write("this[" + string.Join(", ", primary.DeclaredParameters.SkipLast(getAccess >= setAccess? 0 : 1).Select(p => p.GetParameterString())) + "] { ");
writer.Write((prop.CanRead? prop.GetMethod.CustomAttributes.Where(a => !SuppressGenerated || a.AttributeType.FullName != CGAttribute).ToString(inline: true)
+ (getAccess < setAccess? prop.GetMethod.GetAccessModifierString() : "") + "get; " : "")