From 2bcf153475c1093130485a84adc9eac9df857caf Mon Sep 17 00:00:00 2001 From: thefiddler Date: Tue, 4 Feb 2014 16:07:58 +0100 Subject: [PATCH] [GL] Fixed invalid IL instruction in Get*() and Delete*() functions --- Source/Generator.Rewrite/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Generator.Rewrite/Program.cs b/Source/Generator.Rewrite/Program.cs index 47531f09..b18ea7ff 100644 --- a/Source/Generator.Rewrite/Program.cs +++ b/Source/Generator.Rewrite/Program.cs @@ -452,9 +452,10 @@ namespace OpenTK.Rewrite private static void EmitConvenienceWrapper(MethodDefinition wrapper, MethodDefinition native, int difference, MethodBody body, ILProcessor il) { - if (wrapper.Parameters.Count > 1) + if (wrapper.Parameters.Count > 2) { - EmitParameters(wrapper, body, il); + // Todo: emit all parameters bar the last two + throw new NotImplementedException(); } if (wrapper.ReturnType.Name != "Void") @@ -483,6 +484,7 @@ namespace OpenTK.Rewrite // return result; // } body.Variables.Add(new VariableDefinition(wrapper.ReturnType)); + EmitParameters(wrapper, body, il); il.Emit(OpCodes.Ldloca, body.Variables.Count - 1); } else