提交 bae5fc70 编写于 作者: M Marc Gravell

ldc_i4_s fix

上级 0bba6966
......@@ -1010,7 +1010,16 @@ private static void EmitInt32(ILGenerator il, int value)
case 6: il.Emit(OpCodes.Ldc_I4_6); break;
case 7: il.Emit(OpCodes.Ldc_I4_7); break;
case 8: il.Emit(OpCodes.Ldc_I4_8); break;
default: il.Emit(value >= -128 && value <= 127 ? OpCodes.Ldc_I4_S: OpCodes.Ldc_I4, value); break;
default:
if (value >= -128 && value <= 127)
{
il.Emit(OpCodes.Ldc_I4_S, (sbyte)value);
}
else
{
il.Emit(OpCodes.Ldc_I4, value);
}
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册