fixed right shift operator for unsigned values

This is version protected to avoid breaking old code.
This commit is contained in:
Christoph Oelckers 2018-11-16 11:32:24 +01:00
parent 7cd89fe07b
commit 358001c306

View file

@ -4011,7 +4011,7 @@ FxExpression *FxShift::Resolve(FCompileContext& ctx)
if (left->IsNumeric() && right->IsNumeric()) if (left->IsNumeric() && right->IsNumeric())
{ {
if (!Promote(ctx, true)) return nullptr; if (!Promote(ctx, true)) return nullptr;
if (ValueType == TypeUInt32 && Operator == TK_RShift) Operator = TK_URShift; if ((left->ValueType == TypeUInt32 && ctx.Version >= MakeVersion(3, 7)) && Operator == TK_RShift) Operator = TK_URShift;
} }
else else
{ {