From edd7005c625667c4faa50cd770a05c9a85506127 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 25 Dec 2020 15:42:04 -0800 Subject: [PATCH] Fixed CheckBinaryOperatorPrecedence with partial conditional expression --- IDEHelper/Compiler/BfReducer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IDEHelper/Compiler/BfReducer.cpp b/IDEHelper/Compiler/BfReducer.cpp index e2bea4b3..be2d4445 100644 --- a/IDEHelper/Compiler/BfReducer.cpp +++ b/IDEHelper/Compiler/BfReducer.cpp @@ -1133,6 +1133,9 @@ BfExpression* BfReducer::CheckBinaryOperatorPrecedence(BfBinaryOperatorExpressio bool didCondSwap = false; while (auto rightCondExpression = BfNodeDynCast(checkBinOpExpression->mRight)) { + if (rightCondExpression->mTrueExpression == NULL) + break; + // Turn (A || (B ? C : D)) into ((A || B) ? C : D) BfExpression* exprA = checkBinOpExpression->mLeft;