Browse Source

Check that method is actually the entry point

pull/1029/head
MikeFH 8 years ago
parent
commit
c299304034
  1. 2
      ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs

2
ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs

@ -47,7 +47,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow @@ -47,7 +47,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow
public static bool IsCompilerGeneratedMainMethod(MethodDefinition method)
{
return method.Name.Equals("<Main>", StringComparison.Ordinal);
return method == method.Module.Assembly?.EntryPoint && method.Name.Equals("<Main>", StringComparison.Ordinal);
}
enum AsyncMethodType

Loading…
Cancel
Save