mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fixed index cast to int
This commit is contained in:
parent
dcacf87d66
commit
8f59a9dc0a
1 changed files with 3 additions and 2 deletions
|
@ -18079,7 +18079,8 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mModule->Fail("Expected integer index", indexerExpr->mArguments[0]);
|
indexArgument = mModule->Cast(indexerExpr->mArguments[0], indexArgument, mModule->GetPrimitiveType(BfTypeCode_IntPtr));
|
||||||
|
if (!indexArgument)
|
||||||
indexArgument = mModule->GetDefaultTypedValue(mModule->GetPrimitiveType(BfTypeCode_IntPtr));
|
indexArgument = mModule->GetDefaultTypedValue(mModule->GetPrimitiveType(BfTypeCode_IntPtr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue