From 97e643c7e1731e574f2bc5ffc78d1918b6f7e3ec Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 15 Nov 2016 14:53:01 +0100 Subject: [PATCH] - fixed: DECORATE tried to resolved null states again, causing a type conflict. --- src/scripting/decorate/thingdef_exp.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scripting/decorate/thingdef_exp.cpp b/src/scripting/decorate/thingdef_exp.cpp index 229c8f1f48..2d69be3405 100644 --- a/src/scripting/decorate/thingdef_exp.cpp +++ b/src/scripting/decorate/thingdef_exp.cpp @@ -477,9 +477,12 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls) exp = new FxRuntimeStateIndex(ParseExpressionM(sc, cls)); } // The parsed expression is of type 'statelabel', but we want a real state here so we must convert it. - FArgumentList args; - args.Push(exp); - exp = new FxFunctionCall(NAME_ResolveState, NAME_None, args, sc); + if (!exp->isConstant()) + { + FArgumentList args; + args.Push(exp); + exp = new FxFunctionCall(NAME_ResolveState, NAME_None, args, sc); + } sc.MustGetToken(')'); return exp; }