fixes for 32bit system (#23980)

(cherry picked from commit a4dff1a03e)
This commit is contained in:
ringabout
2024-08-19 20:58:44 +08:00
committed by narimiran
parent 3214174f06
commit 4b8b8fb9d7

View File

@@ -410,7 +410,7 @@ proc foldConv(n, a: PNode; idgen: IdGenerator; g: ModuleGraph; check = false): P
of tyChar, tyUInt..tyUInt64, tyInt..tyInt64:
var val = a.getOrdValue
if dstTyp.kind in {tyUInt..tyUInt64}:
result = newIntNodeT(maskBytes(val, getSize(g.config, dstTyp)), n, idgen, g)
result = newIntNodeT(maskBytes(val, int getSize(g.config, dstTyp)), n, idgen, g)
result.transitionIntKind(nkUIntLit)
else:
if check: rangeCheck(n, val, g)