Skip to content

Commit

Permalink
re-fix mod
Browse files Browse the repository at this point in the history
  • Loading branch information
dnek committed Sep 7, 2015
1 parent 06b847d commit 1da1c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pidet/main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ void AdvanceDebug()
case 7: //mod
if (stack.Count < 2) break;
if (stack[last] == 0) break;
stack[last - 1] = Math.Abs(stack[last - 1] % stack[last]) * Math.Sign(stack[last]);
stack[last - 1] %= stack[last];
if (stack[last] * stack[last - 1] < 0) stack[last - 1] += stack[last];
stack.RemoveAt(last);
break;
case 8: //not
Expand Down

0 comments on commit 1da1c10

Please sign in to comment.