Skip to content

Commit

Permalink
Reversed return values.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Apr 15, 2016
1 parent d6bc042 commit a2d610e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Cosmos.IL2CPU/AppAssembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ protected void MethodEnd(MethodInfo aMethod)
if (xReturnSize > 0)
{
var xOffset = GetResultCodeOffset(xReturnSize, (uint)xTotalArgsSize);
for (int i = ((int)(xReturnSize/4)) - 1; i >= 0; i--)
for (int i = 0; i < ((int)(xReturnSize/4)); i++)
{
new Pop { DestinationReg = Registers.EAX };
new Mov { DestinationReg = Registers.EBP, DestinationIsIndirect = true, DestinationDisplacement = (int)(xOffset + ((i + 0) * 4)), SourceReg = Registers.EAX };
Expand Down

0 comments on commit a2d610e

Please sign in to comment.