Skip il that can't be interpreted

This commit is contained in:
Ben Adams 2017-11-30 15:17:03 +00:00
parent 4f2a8602e9
commit 9945e82cb7
2 changed files with 21 additions and 14 deletions

View File

@ -11,7 +11,7 @@
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<IncludeSource>true</IncludeSource>
<Version>0.0.5</Version>
<Version>0.0.6</Version>
</PropertyGroup>
<PropertyGroup>

View File

@ -335,9 +335,10 @@ namespace System.Diagnostics
}
}
try
{
var rawIL = methodBody?.GetILAsByteArray();
if (rawIL == null) continue;
var reader = new ILReader(rawIL);
while (reader.Read(candidateMethod))
{
@ -357,6 +358,12 @@ namespace System.Diagnostics
}
}
}
catch
{
// https://github.com/benaadams/Ben.Demystifier/issues/32
// Skip methods where il can't be interpreted
}
}
return false;
}