diff options
-rw-r--r-- | shell/math.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/math.c b/shell/math.c index 9d3b912a7..760645d0f 100644 --- a/shell/math.c +++ b/shell/math.c | |||
@@ -652,10 +652,10 @@ evaluate_string(arith_state_t *math_state, const char *expr) | |||
652 | * integer stack. | 652 | * integer stack. |
653 | * But for binary operators, "apply" everything on the operator | 653 | * But for binary operators, "apply" everything on the operator |
654 | * stack until we find an operator with a lesser priority than the | 654 | * stack until we find an operator with a lesser priority than the |
655 | * one we have just extracted. | 655 | * one we have just extracted. If op is right-associative, |
656 | * then stop "applying" on the equal priority too. | ||
656 | * Left paren is given the lowest priority so it will never be | 657 | * Left paren is given the lowest priority so it will never be |
657 | * "applied" in this way. | 658 | * "applied" in this way. |
658 | * if associativity is right and priority eq, applied also skip | ||
659 | */ | 659 | */ |
660 | prec = PREC(op); | 660 | prec = PREC(op); |
661 | if ((prec > 0 && prec < UNARYPREC) || prec == SPEC_PREC) { | 661 | if ((prec > 0 && prec < UNARYPREC) || prec == SPEC_PREC) { |