mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
Fixed: the game could crash while parsing expressions in some places
This commit is contained in:
parent
9229146eeb
commit
4a859393fe
2 changed files with 5 additions and 1 deletions
|
@ -392,7 +392,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
|
||||||
return ParseAtan2(sc, identifier, cls);
|
return ParseAtan2(sc, identifier, cls);
|
||||||
default:
|
default:
|
||||||
args = new FArgumentList;
|
args = new FArgumentList;
|
||||||
func = dyn_cast<PFunction>(cls->Symbols.FindSymbol(identifier, true));
|
func = (cls == nullptr) ? nullptr : dyn_cast<PFunction>(cls->Symbols.FindSymbol(identifier, true));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// There is an action function ACS_NamedExecuteWithResult which must be ignored here for this to work.
|
// There is an action function ACS_NamedExecuteWithResult which must be ignored here for this to work.
|
||||||
|
|
|
@ -4410,6 +4410,8 @@ ExpEmit FxClassTypeCast::Emit(VMFunctionBuilder *build)
|
||||||
FxExpression *FxStateByIndex::Resolve(FCompileContext &ctx)
|
FxExpression *FxStateByIndex::Resolve(FCompileContext &ctx)
|
||||||
{
|
{
|
||||||
CHECKRESOLVED();
|
CHECKRESOLVED();
|
||||||
|
ABORT(ctx.Class);
|
||||||
|
|
||||||
if (ctx.Class->NumOwnedStates == 0)
|
if (ctx.Class->NumOwnedStates == 0)
|
||||||
{
|
{
|
||||||
// This can't really happen
|
// This can't really happen
|
||||||
|
@ -4464,6 +4466,8 @@ FxMultiNameState::FxMultiNameState(const char *_statestring, const FScriptPositi
|
||||||
FxExpression *FxMultiNameState::Resolve(FCompileContext &ctx)
|
FxExpression *FxMultiNameState::Resolve(FCompileContext &ctx)
|
||||||
{
|
{
|
||||||
CHECKRESOLVED();
|
CHECKRESOLVED();
|
||||||
|
ABORT(ctx.Class);
|
||||||
|
|
||||||
if (names[0] == NAME_None)
|
if (names[0] == NAME_None)
|
||||||
{
|
{
|
||||||
scope = NULL;
|
scope = NULL;
|
||||||
|
|
Loading…
Reference in a new issue