2002-07-11 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 11 Jul 2002 22:29:43 +0000 (22:29 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 11 Jul 2002 22:29:43 +0000 (22:29 -0000)
* expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
wrong opcode for loading bytes and bools (ldelem.i1 instead of
ldelem.u1) and using the opposite for sbytes.

This fixes Digger, and we can finally run it.

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

mcs/mcs/ChangeLog
mcs/mcs/expression.cs

index 0b247efc4204fa64f6ab514a71a570a0b901bb9f..30d1d264c686bb13be0d0e8c79da9cfff017735b 100755 (executable)
@@ -1,5 +1,11 @@
 2002-07-11  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (ArrayAccess.EmitLoadOpcode): I was using the
+       wrong opcode for loading bytes and bools (ldelem.i1 instead of
+       ldelem.u1) and using the opposite for sbytes.
+
+       This fixes Digger, and we can finally run it.
+
        * driver.cs (UnixParseOption): Move the option parsing here.  
        (CSCParseOption): Implement CSC-like parsing of options.
 
index d5ac42bd0690ee48f427d70f372276dde27e98bf..e0ec0a014f4cec23c117dd4e1c36f88360446561 100755 (executable)
@@ -5619,9 +5619,9 @@ namespace Mono.CSharp {
                static public void EmitLoadOpcode (ILGenerator ig, Type type)
                {
                        if (type == TypeManager.byte_type || type == TypeManager.bool_type)
-                               ig.Emit (OpCodes.Ldelem_I1);
-                       else if (type == TypeManager.sbyte_type)
                                ig.Emit (OpCodes.Ldelem_U1);
+                       else if (type == TypeManager.sbyte_type)
+                               ig.Emit (OpCodes.Ldelem_I1);
                        else if (type == TypeManager.short_type)
                                ig.Emit (OpCodes.Ldelem_I2);
                        else if (type == TypeManager.ushort_type)