Skip to content
Permalink
Browse files

- fixed missing checks for function calls from DECORATE

State functions could call ZScript code with incompatible self pointer, e.g. weapon's function could be called with self pointed to player pawn
DECORATE scripts that contain such errors are no longer accepted

https://forum.zdoom.org/viewtopic.php?t=66429
  • Loading branch information
alexey-lysiuk committed Nov 21, 2019
1 parent 310459b commit cf8c05c9c45b70450dfaf4630d6bd33fae76a91e
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/scripting/decorate/thingdef_exp.cpp
@@ -510,7 +510,8 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
sc.UnGet();
ParseFunctionParameters(sc, cls, args, func, "", nullptr);
}
return new FxVMFunctionCall(new FxSelf(sc), func, args, sc, false);
// FxVMFunctionCall cannot be used here as it lacks some important checks
return new FxFunctionCall(identifier, NAME_None, args, sc);
}
}

0 comments on commit cf8c05c

Please sign in to comment.
You can’t perform that action at this time.