diff options
Diffstat (limited to '')
-rwxr-xr-x | .bin/rpn.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.bin/rpn.c b/.bin/rpn.c index d3fe0667..b7d3e0a1 100755 --- a/.bin/rpn.c +++ b/.bin/rpn.c @@ -55,10 +55,8 @@ static bool stack_op(char op) { return true; } if (stack.op == '"') { - if (op == '"') - stack.op = 0; - else - push(op); + if (op == '"') stack.op = 0; + else push(op); return true; } @@ -73,6 +71,7 @@ static bool stack_op(char op) { break; case '*': a = pop(); push(pop() * a); break; case '/': a = pop(); push(pop() / a); break; case '%': a = pop(); push(pop() % a); + break; case '!': a = pop(); push(!a); break; case '~': a = pop(); push(~a); break; case '&': a = pop(); push(pop() & a); break; case '|': a = pop(); push(pop() | a); |