mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-13 07:31:04 +00:00
Don't throw away unsignedness when passing unsigned constants to the codegen
This commit is contained in:
parent
7ce29fe855
commit
f7f9746a0f
1 changed files with 8 additions and 1 deletions
|
@ -2808,7 +2808,14 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast, bool substitute)
|
||||||
}
|
}
|
||||||
else if (cnst->Type->isInt())
|
else if (cnst->Type->isInt())
|
||||||
{
|
{
|
||||||
return new FxConstant(cnst->IntVal, *ast);
|
if (cnst->Type == TypeUInt32)
|
||||||
|
{
|
||||||
|
return new FxConstant((unsigned)cnst->IntVal, *ast);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new FxConstant(cnst->IntVal, *ast);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (cnst->Type == TypeBool)
|
else if (cnst->Type == TypeBool)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue