Tue Jul 16 19:32:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Tue, 16 Jul 2002 17:34:12 +0000 (17:34 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Tue, 16 Jul 2002 17:34:12 +0000 (17:34 -0000)
* ILGenerator.cs: stack size check fix.

svn path=/trunk/mcs/; revision=5830

mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs

index 94df1cf0eae11a93551aa2167c467671257f1ab9..87de726c336b4098754fc18f615a68882f32569e 100644 (file)
@@ -1,4 +1,8 @@
 
+Tue Jul 16 19:32:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * ILGenerator.cs: stack size check fix.
+
 Sat Jul 13 17:30:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
 
        * AssemblyBuilder.cs: add also the enum_type for compiling corlib.
index b184c69375fff4f5b1e317a309eeba6d207eb50b..b265e309ca823e4a8f38351a31eba81adf9f2a7b 100644 (file)
@@ -500,8 +500,8 @@ namespace System.Reflection.Emit {
                        if (method is MethodBuilder)
                                add_token_fixup (method);
                        emit_int (token);
-                       if (method.ReturnType == void_type)
-                               cur_stack --;
+                       if (method.ReturnType != void_type)
+                               cur_stack ++;
                        ParameterInfo[] mparams = method.GetParameters();
                        if (mparams != null)
                                cur_stack -= mparams.Length;