mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
- version-restrict int to uint promotion.
Some mods depend on this not happening.
This commit is contained in:
parent
5cee2b5803
commit
8eabaf61c9
1 changed files with 2 additions and 2 deletions
|
@ -2686,13 +2686,13 @@ bool FxBinary::Promote(FCompileContext &ctx, bool forceint)
|
|||
ValueType = TypeUInt32;
|
||||
}
|
||||
// If one side is an unsigned 32-bit int and the other side is a signed 32-bit int, the signed side is implicitly converted to unsigned.
|
||||
else if (!ctx.FromDecorate && left->ValueType == TypeUInt32 && right->ValueType == TypeSInt32)
|
||||
else if (!ctx.FromDecorate && left->ValueType == TypeUInt32 && right->ValueType == TypeSInt32 && ctx.Version >= MakeVersion(4, 9, 0))
|
||||
{
|
||||
right = new FxIntCast(right, false, false, true);
|
||||
right = right->Resolve(ctx);
|
||||
ValueType = TypeUInt32;
|
||||
}
|
||||
else if (!ctx.FromDecorate && left->ValueType == TypeSInt32 && right->ValueType == TypeUInt32)
|
||||
else if (!ctx.FromDecorate && left->ValueType == TypeSInt32 && right->ValueType == TypeUInt32 && ctx.Version >= MakeVersion(4, 9, 0))
|
||||
{
|
||||
left = new FxIntCast(left, false, false, true);
|
||||
left = left->Resolve(ctx);
|
||||
|
|
Loading…
Reference in a new issue