Browse Source

Fix bug in MetadataLoader

pull/1198/head
Siegfried Pammer 8 years ago
parent
commit
4263fc298e
  1. 8
      ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs

8
ICSharpCode.Decompiler/TypeSystem/MetadataLoader.cs

@ -650,9 +650,11 @@ namespace ICSharpCode.Decompiler.TypeSystem @@ -650,9 +650,11 @@ namespace ICSharpCode.Decompiler.TypeSystem
attr.AddNamedFieldArgument("ArraySubType", CreateSimpleConstantValue(unmanagedTypeTypeRef, type));
break;
case 0x1d: // SafeArray
VarEnum varType = (VarEnum)marshalInfo.ReadByte();
if (varType != VarEnum.VT_EMPTY)
attr.AddNamedFieldArgument("SafeArraySubType", CreateSimpleConstantValue(typeof(VarEnum).ToTypeReference(), (int)varType));
if (marshalInfo.RemainingBytes > 0) {
VarEnum varType = (VarEnum)marshalInfo.ReadByte();
if (varType != VarEnum.VT_EMPTY)
attr.AddNamedFieldArgument("SafeArraySubType", CreateSimpleConstantValue(typeof(VarEnum).ToTypeReference(), (int)varType));
}
break;
case 0x2a: // NATIVE_TYPE_ARRAY
if (marshalInfo.RemainingBytes > 0) {

Loading…
Cancel
Save