From 4dd59188fa7c365333c0c15f8fe47f4859cd387c Mon Sep 17 00:00:00 2001 From: Rebizu Date: Tue, 17 Nov 2015 20:14:49 +0100 Subject: [PATCH] fixes #254 --- source/Cosmos.IL2CPU/ILOpCodes/OpNone.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/Cosmos.IL2CPU/ILOpCodes/OpNone.cs b/source/Cosmos.IL2CPU/ILOpCodes/OpNone.cs index 55c83fe60a..35b0b52a3b 100644 --- a/source/Cosmos.IL2CPU/ILOpCodes/OpNone.cs +++ b/source/Cosmos.IL2CPU/ILOpCodes/OpNone.cs @@ -522,6 +522,15 @@ protected override void DoInterpretStackTypes(ref bool aSituationChanged) if (!StackPopTypes.Contains(null)) { // PopTypes set, but PushType not yet, so fill it. + + if ((StackPopTypes[0] == typeof(bool) && StackPopTypes[1] == typeof(Int32)) || + (StackPopTypes[0] == typeof(Int32) && StackPopTypes[1] == typeof(bool))) + { + StackPushTypes[0] = typeof(Int32); + aSituationChanged = true; + return; + } + if ((StackPopTypes[0] == typeof (IntPtr) && StackPopTypes[1] == typeof (UInt32*)) || (StackPopTypes[0] == typeof (uint*) && StackPopTypes[1] == typeof (IntPtr))) {