mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-15 00:41:30 +00:00
Fix constant < > <= >= evaluation
- SendExprCommand() evaluated all four of these as their inverse. I wouldn't at all be surprised if this was caused by me fixing the undefined behavior (Which PopExStk() is called first?) and not even noticing that these were reversed because they popped off the stack in reverse order.
This commit is contained in:
parent
3a5bedf702
commit
26d4df32d4
1 changed files with 4 additions and 4 deletions
8
parse.c
8
parse.c
|
@ -3806,19 +3806,19 @@ static void SendExprCommand(pcd_t pcd)
|
|||
break;
|
||||
case PCD_LT:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk() >= operand2);
|
||||
PushExStk(PopExStk() < operand2);
|
||||
break;
|
||||
case PCD_GT:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk() <= operand2);
|
||||
PushExStk(PopExStk() > operand2);
|
||||
break;
|
||||
case PCD_LE:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk() > operand2);
|
||||
PushExStk(PopExStk() <= operand2);
|
||||
break;
|
||||
case PCD_GE:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk() < operand2);
|
||||
PushExStk(PopExStk() >= operand2);
|
||||
break;
|
||||
case PCD_ANDLOGICAL:
|
||||
operand2 = PopExStk();
|
||||
|
|
Loading…
Reference in a new issue