mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +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())
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue