mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- do not accept read-only variable as out argument
https://forum.zdoom.org/viewtopic.php?t=66179
This commit is contained in:
parent
9a727f6c2f
commit
94e7b6f3b5
1 changed files with 8 additions and 0 deletions
|
@ -9047,6 +9047,14 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
|||
else
|
||||
{
|
||||
ArgList[i]->RequestAddress(ctx, &writable);
|
||||
|
||||
if ((flag & VARF_Out) && !writable)
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Argument must be a modifiable value");
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (flag & VARF_Ref)ArgList[i]->ValueType = NewPointer(ArgList[i]->ValueType);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue