Parcourir la source

Fixed sized array OOB check with undef index

Brian Fiete il y a 10 mois
Parent
commit
c73968a515
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 1 - 1
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -22135,7 +22135,7 @@ void BfExprEvaluator::HandleIndexerExpression(BfIndexerExpression* indexerExpr,
 		if (indexArgument.mValue.IsConst())
 		{
 			auto indexConst = mModule->mBfIRBuilder->GetConstant(indexArgument.mValue);
-			if (indexConst->mUInt64 >= (uint64)sizedArrayType->mElementCount)
+			if ((BfIRBuilder::IsIntable(indexConst->mTypeCode)) && (indexConst->mUInt64 >= (uint64)sizedArrayType->mElementCount))
 			{
 				if ((!mModule->IsInSpecializedSection()) && (checkedKind != BfCheckedKind_Unchecked))
 				{