mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Avoid direct recursion when computing the exceptions of a method.
* exceptions.cs: When Filling the exceptions of a method make sure to not recurse on the methods itself as this can lead to a stackoverflow.
This commit is contained in:
1 parent
5c9cedd328
commit
04bf9add68
1 file changed
+4
@@ -145,6 +145,10 @@ namespace Mono.Documentation {
|
||||
body.Method.DeclaringType.Scope.Name == memberRef.DeclaringType.Scope.Name) ||
|
||||
((locations & ExceptionLocations.DependentAssemblies) != 0 &&
|
||||
body.Method.DeclaringType.Scope.Name != memberRef.DeclaringType.Scope.Name)) {
|
||||
|
||||
if (memberRef.Resolve () == body.Method)
|
||||
break;
|
||||
|
||||
IEnumerable<ExceptionSources> memberExceptions = this [memberRef];
|
||||
AddExceptions (body, instruction,
|
||||
memberExceptions.Select (es => es.Exception),
|
||||
|
||||
Reference in new issue
Block a user