diff --git a/src/IKVM.Runtime/StubGen/StubGenerator.cs b/src/IKVM.Runtime/StubGen/StubGenerator.cs index c50402c562..2a6e36b572 100644 --- a/src/IKVM.Runtime/StubGen/StubGenerator.cs +++ b/src/IKVM.Runtime/StubGen/StubGenerator.cs @@ -965,7 +965,7 @@ void EncodeElementValue(ClassFileBuilder builder, ref ElementValueEncoder encode { e.Annotation(builder.Constants.GetOrAddUtf8(DecodeTypeName((string)v[1])), e2 => { - for (int i = 2; i < v.Length; i++) + for (int i = 2; i < v.Length; i += 2) e2.Element(builder.Constants.GetOrAddUtf8((string)v[i]), e3 => EncodeElementValue(builder, ref e3, v[i + 1])); }); });