mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +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
c9641ce335
commit
62d3f61bac
1 changed files with 8 additions and 0 deletions
|
@ -9051,6 +9051,14 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ArgList[i]->RequestAddress(ctx, &writable);
|
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);
|
if (flag & VARF_Ref)ArgList[i]->ValueType = NewPointer(ArgList[i]->ValueType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue