mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed zero-sized sized array loop issues
This commit is contained in:
parent
966b740e6c
commit
c0e19171d4
5 changed files with 83 additions and 11 deletions
|
@ -3686,7 +3686,7 @@ BfTypedValue CeContext::Call(BfAstNode* targetSrc, BfModule* module, BfMethodIns
|
|||
|
||||
AutoTimer autoTimer(mCeMachine->mRevisionExecuteTime);
|
||||
|
||||
SetAndRestoreValue<CeContext*> prevContext(mCeMachine->mCurContext, this);
|
||||
SetAndRestoreValue<CeContext*> prevContext(mCeMachine->mCurContext, this);
|
||||
SetAndRestoreValue<CeEvalFlags> prevEvalFlags(mCurEvalFlags, flags);
|
||||
SetAndRestoreValue<BfAstNode*> prevTargetSrc(mCurTargetSrc, targetSrc);
|
||||
SetAndRestoreValue<BfModule*> prevModule(mCurModule, module);
|
||||
|
@ -3942,9 +3942,13 @@ BfTypedValue CeContext::Call(BfAstNode* targetSrc, BfModule* module, BfMethodIns
|
|||
Fail("Failed to encode return argument");
|
||||
}
|
||||
}
|
||||
else if (returnType->IsComposite())
|
||||
{
|
||||
returnValue = BfTypedValue(module->mBfIRBuilder->CreateConstArrayZero(module->mBfIRBuilder->MapType(returnType)), returnType);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = BfTypedValue(module->mBfIRBuilder->GetFakeVal(), returnType);
|
||||
returnValue = BfTypedValue(module->mBfIRBuilder->GetFakeVal(), returnType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue