Browse Source

Fix #1368: Ignore errors while decoding attribute blobs.

pull/1405/head
Siegfried Pammer 7 years ago
parent
commit
b93d99a318
  1. 7
      ICSharpCode.Decompiler/TypeSystem/Implementation/CustomAttribute.cs

7
ICSharpCode.Decompiler/TypeSystem/Implementation/CustomAttribute.cs

@ -90,6 +90,13 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation @@ -90,6 +90,13 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
);
hasDecodeErrors = true;
valueDecoded = true; // in case of errors, never try again.
} catch (BadImageFormatException) {
value = new CustomAttributeValue<IType>(
ImmutableArray<CustomAttributeTypedArgument<IType>>.Empty,
ImmutableArray<CustomAttributeNamedArgument<IType>>.Empty
);
hasDecodeErrors = true;
valueDecoded = true; // in case of errors, never try again.
}
}
}

Loading…
Cancel
Save