From 9fc6ae9f05b49bcd3fa12231bc4349e68253faf3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 8 Jan 2022 22:06:18 -0500 Subject: [PATCH] Fixed const bool value for 'the result of this operation is always false' --- IDEHelper/Compiler/BfExprEvaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 707bdcd3..a17a2309 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -21251,7 +21251,7 @@ bool BfExprEvaluator::CheckConstCompare(BfBinaryOp binaryOp, BfAstNode* opToken, if (constResult == 0) { mModule->Warn(0, "The result of this operation is always 'false'", opToken); - mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 1), mModule->GetPrimitiveType(BfTypeCode_Boolean)); + mResult = BfTypedValue(mModule->mBfIRBuilder->CreateConst(BfTypeCode_Boolean, 0), mModule->GetPrimitiveType(BfTypeCode_Boolean)); return true; } else if (constResult == 1)