瀏覽代碼

Fixed const bool value for 'the result of this operation is always false'

Brian Fiete 3 年之前
父節點
當前提交
9fc6ae9f05
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 1
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)