mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 06:14:10 +02:00
Fixed sized array init with unknown-size array
This commit is contained in:
parent
ad9cf3c548
commit
d5768c0a83
1 changed files with 1 additions and 1 deletions
|
@ -15495,7 +15495,7 @@ void BfExprEvaluator::InitializedSizedArray(BfSizedArrayType* arrayType, BfToken
|
||||||
{
|
{
|
||||||
if (initCountDiff > 0)
|
if (initCountDiff > 0)
|
||||||
{
|
{
|
||||||
mModule->Fail(StrFormat("Too many initializers, expected %d fewer", initCountDiff), valueExprs[(int)checkArrayType->mElementCount]);
|
mModule->Fail(StrFormat("Too many initializers, expected %d fewer", initCountDiff), valueExprs[BF_MAX((int)checkArrayType->mElementCount, 0)]);
|
||||||
failedAt.Add(depth);
|
failedAt.Add(depth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue