Merge branch 'master' into confuser

This commit is contained in:
de4dot 2012-07-30 10:27:06 +02:00
commit 498316d2a2
2 changed files with 10 additions and 2 deletions

View File

@ -596,7 +596,8 @@ namespace de4dot.blocks {
return null;
var resources = module.Resources;
foreach (var resourceName in strings) {
foreach (var tmp in strings) {
var resourceName = removeFromNullChar(tmp);
if (resourceName == null)
continue;
foreach (var resource in resources) {
@ -608,6 +609,13 @@ namespace de4dot.blocks {
return null;
}
static string removeFromNullChar(string s) {
int index = s.IndexOf((char)0);
if (index < 0)
return s;
return s.Substring(0, index);
}
// Copies most things but not everything
public static MethodDefinition clone(MethodDefinition method) {
var newMethod = new MethodDefinition(method.Name, method.Attributes, method.MethodReturnType.ReturnType);

View File

@ -177,7 +177,7 @@ namespace de4dot.code {
public abstract bool HasHandlers { get; }
protected MethodDefinition Method {
public MethodDefinition Method {
get { return theMethod; }
}