Author: jbevain
Date: 2006-06-21 10:32:43 -0400 (Wed, 21 Jun 2006)
New Revision: 61907

Modified:
   trunk/cecil/lib/ChangeLog
   trunk/cecil/lib/Mono.Cecil.Cil/CilWorker.cs
Log:
2006-06-21  Jb Evain  <[EMAIL PROTECTED]>

        * Mono.Cecil.Cil/CilWorker.cs:
                Fix ldc.i4.s emitting.


Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog   2006-06-21 13:54:11 UTC (rev 61906)
+++ trunk/cecil/lib/ChangeLog   2006-06-21 14:32:43 UTC (rev 61907)
@@ -1,3 +1,8 @@
+2006-06-21  Jb Evain  <[EMAIL PROTECTED]>
+
+       * Mono.Cecil.Cil/CilWorker.cs:
+               Fix ldc.i4.s emitting.
+
 2006-06-13  Jb Evain  <[EMAIL PROTECTED]>
 
        * Mono.Cecil/ReflectionWriter.cs:

Modified: trunk/cecil/lib/Mono.Cecil.Cil/CilWorker.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Cil/CilWorker.cs 2006-06-21 13:54:11 UTC (rev 
61906)
+++ trunk/cecil/lib/Mono.Cecil.Cil/CilWorker.cs 2006-06-21 14:32:43 UTC (rev 
61907)
@@ -95,8 +95,8 @@
 
                public Instruction Create (OpCode opcode, sbyte b)
                {
-                       if (opcode.OperandType != OperandType.ShortInlineI ||
-                               opcode == OpCodes.Ldc_I4_S)
+                       if (opcode.OperandType != OperandType.ShortInlineI &&
+                               opcode != OpCodes.Ldc_I4_S)
                                throw new ArgumentException ("opcode");
 
                        return FinalCreate (opcode, b);
@@ -104,8 +104,8 @@
 
                public Instruction Create (OpCode opcode, byte b)
                {
-                       if (opcode.OperandType != OperandType.ShortInlineI &&
-                               opcode != OpCodes.Ldc_I4_S)
+                       if (opcode.OperandType != OperandType.ShortInlineI ||
+                               opcode == OpCodes.Ldc_I4_S)
                                throw new ArgumentException ("opcode");
 
                        return FinalCreate (opcode, b);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to