mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Range check on methodState->mLocals
This commit is contained in:
parent
81aaefff0c
commit
ee50457885
1 changed files with 2 additions and 1 deletions
|
@ -20376,7 +20376,8 @@ bool BfExprEvaluator::CheckModifyResult(BfTypedValue& typedVal, BfAstNode* refNo
|
|||
else if (typedVal.mValue.IsArg())
|
||||
{
|
||||
auto methodState = mModule->mCurMethodState->GetNonCaptureState();
|
||||
localVar = methodState->mLocals[typedVal.mValue.mId];
|
||||
if (typedVal.mValue.mId < methodState->mLocals.mSize)
|
||||
localVar = methodState->mLocals[typedVal.mValue.mId];
|
||||
}
|
||||
|
||||
if ((typedVal.mKind == BfTypedValueKind_MutableValue) && (onlyNeedsMut))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue