- fixed: DECORATE tried to resolved null states again, causing a type conflict.

This commit is contained in:
Christoph Oelckers 2016-11-15 14:53:01 +01:00
parent d4d6b739e0
commit 97e643c7e1

View file

@ -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;
}