- scriptified a_archvile.cpp.

- fixed the type checks for the conditional operator.
This commit is contained in:
Christoph Oelckers 2016-10-30 18:41:39 +01:00
commit 2857fac338
10 changed files with 120 additions and 171 deletions

View file

@ -345,6 +345,7 @@ static int EncodeRegType(ExpEmit reg)
else if (reg.RegCount == 2)
{
regtype |= REGT_MULTIREG2;
}
else if (reg.RegCount == 3)
{
@ -3808,7 +3809,7 @@ FxExpression *FxConditional::Resolve(FCompileContext& ctx)
ValueType = TypeVoid;
//else if (truex->ValueType != falsex->ValueType)
if ((!IsNumeric() && !IsPointer() && !IsVector()) || ValueType == TypeVoid)
if (ValueType->GetRegType() == REGT_NIL)
{
ScriptPosition.Message(MSG_ERROR, "Incompatible types for ?: operator");
delete this;