diff --git a/Editor/Emit/EvalStackCalculator.cs b/Editor/Emit/EvalStackCalculator.cs index 616dc64..f8b11e6 100644 --- a/Editor/Emit/EvalStackCalculator.cs +++ b/Editor/Emit/EvalStackCalculator.cs @@ -253,7 +253,7 @@ namespace Obfuz.Emit private void SimulateRunAllBlocks() { Dictionary blockEvalStackStates = _basicBlocks.Blocks.ToDictionary(b => b, b => new EvalStackState()); - bool methodHasReturnValue = _method.ReturnType.ElementType != ElementType.Void; + bool methodHasReturnValue = _method.ReturnType.RemovePinnedAndModifiers().ElementType != ElementType.Void; CilBody body = _method.Body; if (body.HasExceptionHandlers)