Quellcode durchsuchen

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

Brian Fiete vor 3 Jahren
Ursprung
Commit
9fc6ae9f05
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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)
 	if (constResult == 0)
 	{
 	{
 		mModule->Warn(0, "The result of this operation is always 'false'", opToken);
 		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;
 		return true;
 	}
 	}
 	else  if (constResult == 1)
 	else  if (constResult == 1)