mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- added access check for state functions
Private functions cannot be called from derived classes anymore https://forum.zdoom.org/viewtopic.php?t=66158
This commit is contained in:
parent
1deade93cf
commit
5a6d8035d0
1 changed files with 5 additions and 0 deletions
|
@ -2998,6 +2998,11 @@ FxExpression *ZCCCompiler::SetupActionFunction(PClass *cls, ZCC_TreeNode *af, in
|
|||
int comboflags = afd->Variants[0].UseFlags & StateFlags;
|
||||
if (comboflags == StateFlags) // the function must satisfy all the flags the state requires
|
||||
{
|
||||
if ((afd->Variants[0].Flags & VARF_Private) && afd->OwningClass != cls->VMType)
|
||||
{
|
||||
Error(af, "%s is declared private and not accessible", FName(id->Identifier).GetChars());
|
||||
}
|
||||
|
||||
return new FxVMFunctionCall(new FxSelf(*af), afd, argumentlist, *af, false);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue