From dc9b2c52f9641a86aa7b87aebb4180e1f5b304e6 Mon Sep 17 00:00:00 2001 From: nea Date: Fri, 15 Jul 2022 22:48:28 +0200 Subject: Use left to right association order --- src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java index 45d7c051..7d378a03 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java @@ -172,7 +172,7 @@ public class Calculator { break; assert (l.type == TokenType.BINOP); int pl = getPrecedence(l); - if (pl > p) { + if (pl >= p) { // Association order out.add(op.pop()); } else { break; -- cgit