mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +00:00
- tighten rules for action functions called from Decorate
FxVMFunctionCall (previously used to call action functions from Decorate) skipped self pointer compatibility checks https://forum.zdoom.org/viewtopic.php?t=68678
This commit is contained in:
parent
100897b406
commit
c00dddea68
2 changed files with 5 additions and 7 deletions
|
@ -484,7 +484,7 @@ FxExpression *ParseActions(FScanner &sc, FState state, FString statestring, Bagg
|
|||
// Otherwise, it's a sequence of actions.
|
||||
if (!sc.Compare("{"))
|
||||
{
|
||||
FxVMFunctionCall *call = ParseAction(sc, state, statestring, bag);
|
||||
FxExpression *call = ParseAction(sc, state, statestring, bag);
|
||||
endswithret = true;
|
||||
return new FxReturnStatement(call, sc);
|
||||
}
|
||||
|
@ -568,14 +568,12 @@ FxExpression *ParseActions(FScanner &sc, FState state, FString statestring, Bagg
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FxVMFunctionCall *ParseAction(FScanner &sc, FState state, FString statestring, Baggage &bag)
|
||||
FxExpression* ParseAction(FScanner &sc, FState state, FString statestring, Baggage &bag)
|
||||
{
|
||||
FxVMFunctionCall *call;
|
||||
|
||||
// Make the action name lowercase
|
||||
strlwr (sc.String);
|
||||
|
||||
call = DoActionSpecials(sc, state, bag);
|
||||
FxExpression *call = DoActionSpecials(sc, state, bag);
|
||||
if (call != NULL)
|
||||
{
|
||||
return call;
|
||||
|
@ -588,7 +586,7 @@ FxVMFunctionCall *ParseAction(FScanner &sc, FState state, FString statestring, B
|
|||
{
|
||||
FArgumentList args;
|
||||
ParseFunctionParameters(sc, bag.Info, args, afd, statestring, &bag.statedef);
|
||||
call = new FxVMFunctionCall(new FxSelf(sc), afd, args, sc, false);
|
||||
call = new FxFunctionCall(symname, NAME_None, args, sc);
|
||||
return call;
|
||||
}
|
||||
sc.ScriptError("Invalid parameter '%s'\n", sc.String);
|
||||
|
|
|
@ -200,7 +200,7 @@ void ParseStates(FScanner &sc, PClassActor *actor, AActor *defaults, Baggage &ba
|
|||
void ParseFunctionParameters(FScanner &sc, PClassActor *cls, TArray<FxExpression *> &out_params,
|
||||
PFunction *afd, FString statestring, FStateDefinitions *statedef);
|
||||
FxExpression *ParseActions(FScanner &sc, FState state, FString statestring, Baggage &bag, bool &endswithret);
|
||||
class FxVMFunctionCall *ParseAction(FScanner &sc, FState state, FString statestring, Baggage &bag);
|
||||
FxExpression *ParseAction(FScanner &sc, FState state, FString statestring, Baggage &bag);
|
||||
FName CheckCastKludges(FName in);
|
||||
void SetImplicitArgs(TArray<PType *> *args, TArray<uint32_t> *argflags, TArray<FName> *argnames, PContainerType *cls, uint32_t funcflags, int useflags);
|
||||
PFunction *CreateAnonymousFunction(PContainerType *containingclass, PType *returntype, int flags);
|
||||
|
|
Loading…
Reference in a new issue