Properly use the boolean type in expressions

This fixes things like 'if (GetCVar(x))' not working
This commit is contained in:
Leonard2 2016-07-04 02:19:52 +02:00 committed by Christoph Oelckers
commit 371896b2cc
3 changed files with 186 additions and 183 deletions

View file

@ -331,11 +331,11 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
}
else if (sc.CheckToken(TK_True))
{
return new FxConstant(1, scpos);
return new FxConstant(true, scpos);
}
else if (sc.CheckToken(TK_False))
{
return new FxConstant(0, scpos);
return new FxConstant(false, scpos);
}
else if (sc.CheckToken(TK_IntConst))
{