diff --git a/source2/IL2CPU/Cosmos.IL2CPU.X86/IL/Pop.cs b/source2/IL2CPU/Cosmos.IL2CPU.X86/IL/Pop.cs index 4eba1e167..b8d53f50f 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU.X86/IL/Pop.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU.X86/IL/Pop.cs @@ -15,10 +15,8 @@ namespace Cosmos.IL2CPU.X86.IL { // todo: implement exception support. if (Assembler.Stack.Count > 0) { - new CPUx86.Pop { - DestinationReg = CPUx86.Registers.EAX - }; - Assembler.Stack.Pop(); + var xItem = Assembler.Stack.Pop(); + new CPUx86.Add { DestinationReg = CPUx86.Registers.ESP, SourceValue = (uint)xItem.Size }; } }