From 95b7b86c5e8646ff684443ac4aab3c037659b7f9 Mon Sep 17 00:00:00 2001 From: Jb Evain Date: Mon, 18 Apr 2016 15:41:51 -0700 Subject: Fix heuristic to detect if we're reading a corelibrary or not --- Mono.Cecil/ModuleDefinition.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mono.Cecil/ModuleDefinition.cs b/Mono.Cecil/ModuleDefinition.cs index fcbe10e..5a9616d 100644 --- a/Mono.Cecil/ModuleDefinition.cs +++ b/Mono.Cecil/ModuleDefinition.cs @@ -1144,7 +1144,7 @@ namespace Mono.Cecil { if (assembly_name != "mscorlib" && assembly_name != "System.Runtime") return false; - if (module.HasImage && !module.Read (module, (m, reader) => reader.image.GetTableLength (Table.TypeDef) > 1)) + if (module.HasImage && module.Read (module, (m, reader) => reader.image.GetTableLength (Table.AssemblyRef) > 0)) return false; return true; -- cgit v1.2.3