diff --git a/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpField.cs b/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpField.cs index 2de8a0412..f7476398f 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpField.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpField.cs @@ -174,7 +174,8 @@ namespace Cosmos.IL2CPU.ILOpCodes { { return; } - throw new Exception("Wrong Poptype encountered!"); + throw new Exception("Wrong Poptype encountered! (Type = " + StackPopTypes[0].FullName + ", expected = " + expectedType.FullName + ")"); + // throw new Exception("Wrong Poptype encountered!"); case Code.Stsfld: if (StackPopTypes[0] == null) { diff --git a/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpType.cs b/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpType.cs index 5be8dbeb6..a02127d5e 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpType.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU/ILOpCodes/OpType.cs @@ -105,7 +105,7 @@ namespace Cosmos.IL2CPU.ILOpCodes { return; case Code.Isinst: StackPopTypes[0] = typeof(object); - StackPushTypes[0] = typeof(bool); + StackPushTypes[0] = Value; return; case Code.Castclass: if (Value.IsGenericType &&