Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2011-08-23 00:43:05 +0400
committerjbevain <jbevain@gmail.com>2011-08-23 00:43:05 +0400
commit611c4aaa58c6ff0aeebde550fc7d41939c396b99 (patch)
treec3dba3b310cd5aa77d8c1d7e1cba27152ba37626 /Mono.Cecil
parentbe236da54bfdfdcf3cadf3e025c1819d205caf4b (diff)
Non .exe modules can have entrypoints
Diffstat (limited to 'Mono.Cecil')
-rw-r--r--Mono.Cecil/AssemblyReader.cs3
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);
}