mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +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;
|
||||
return e;
|
||||
}
|
||||
else if (Operand->ValueType == TypeBool)
|
||||
{
|
||||
Operand = new FxIntCast(Operand, true);
|
||||
Operand = Operand->Resolve(ctx);
|
||||
assert(Operand != nullptr);
|
||||
}
|
||||
ValueType = Operand->ValueType;
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue