diff options
author | jbevain <jbevain@gmail.com> | 2011-08-23 00:43:05 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-08-23 00:43:05 +0400 |
commit | 611c4aaa58c6ff0aeebde550fc7d41939c396b99 (patch) | |
tree | c3dba3b310cd5aa77d8c1d7e1cba27152ba37626 /Mono.Cecil | |
parent | be236da54bfdfdcf3cadf3e025c1819d205caf4b (diff) |
Non .exe modules can have entrypoints
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index 2ea2c3c..cef3ca8 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -528,11 +528,10 @@ namespace Mono.Cecil { public MethodDefinition ReadEntryPoint () { - if (module.Kind != ModuleKind.Console && module.Kind != ModuleKind.Windows) + if (module.Image.EntryPointToken == 0) return null; var token = new MetadataToken (module.Image.EntryPointToken); - return GetMethodDefinition (token.RID); } |