mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Fixed readonly addr handling of indexer expression
This commit is contained in:
parent
3291ed6966
commit
c53c7b4157
2 changed files with 8 additions and 1 deletions
|
@ -15171,6 +15171,9 @@ namespace IDE
|
|||
if (mUpdateCnt % 120 == 0)
|
||||
VerifyModifiedBuffers();
|
||||
|
||||
if (!mSettings.mSettingsValid)
|
||||
Stop();
|
||||
|
||||
if (mWantShowOutput)
|
||||
{
|
||||
ShowOutput();
|
||||
|
|
|
@ -23048,6 +23048,8 @@ void BfExprEvaluator::HandleIndexerExpression(BfIndexerExpression* indexerExpr,
|
|||
if ((sizedArrayType->IsUndefSizedArray()) || (isUndefIndex))
|
||||
{
|
||||
mResult = mModule->GetDefaultTypedValue(underlyingType, false, BfDefaultValueKind_Addr);
|
||||
if ((!target.CanModify()) && (mResult.IsAddr()))
|
||||
mResult.mKind = BfTypedValueKind_ReadOnlyAddr;
|
||||
}
|
||||
else if (sizedArrayType->IsValuelessType())
|
||||
{
|
||||
|
@ -23057,6 +23059,8 @@ void BfExprEvaluator::HandleIndexerExpression(BfIndexerExpression* indexerExpr,
|
|||
{
|
||||
mResult = mModule->GetDefaultTypedValue(underlyingType, false, BfDefaultValueKind_Addr);
|
||||
}
|
||||
if ((!target.CanModify()) && (mResult.IsAddr()))
|
||||
mResult.mKind = BfTypedValueKind_ReadOnlyAddr;
|
||||
}
|
||||
else if (target.IsAddr())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue