mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
This commit is contained in:
parent
4126f8ce72
commit
21531c5ddb
1 changed files with 6 additions and 0 deletions
|
@ -1881,6 +1881,12 @@ FxExpression *FxMinusSign::Resolve(FCompileContext& ctx)
|
||||||
delete this;
|
delete this;
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
else if (Operand->ValueType == TypeBool)
|
||||||
|
{
|
||||||
|
Operand = new FxIntCast(Operand, true);
|
||||||
|
Operand = Operand->Resolve(ctx);
|
||||||
|
assert(Operand != nullptr);
|
||||||
|
}
|
||||||
ValueType = Operand->ValueType;
|
ValueType = Operand->ValueType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue