Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Build] Fixed ErrorHelper local variable

We need to emit a ldloca instruction before constructing the
ErrorHelper instance, in order to reference it in the finally
block below.
  • Loading branch information...
commit 18ef63461066632e9916ad47ef2d4f7bb9fba7de 1 parent 2f3e7a9
@thefiddler thefiddler authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Generator.Rewrite/Program.cs
View
4 Source/Generator.Rewrite/Program.cs
@@ -363,9 +363,9 @@ static DebugVariables EmitDebugPrologue(MethodDefinition wrapper, ILProcessor il
vars.ErrorHelperLocal = new VariableDefinition(vars.ErrorHelperType);
- // var helper = new ErrorHelper(GraphicsContext.CurrentContext);
+ // using (new ErrorHelper(GraphicsContext.CurrentContext)) { ...
il.Body.Variables.Add(vars.ErrorHelperLocal);
- //il.Emit(OpCodes.Ldarga, vars.ErrorHelperLocal); // todo: fix this
+ il.Emit(OpCodes.Ldloca, vars.ErrorHelperLocal);
il.Emit(OpCodes.Call, vars.Get_CurrentContext);
il.Emit(OpCodes.Call, ctor);
Please sign in to comment.
Something went wrong with that request. Please try again.