JS: fix div uint64 no truncation (#16899)
This commit is contained in:
parent
55722fe04d
commit
339ebe958d
2 changed files with 23 additions and 1 deletions
|
|
@ -671,7 +671,10 @@ proc arith(p: PProc, n: PNode, r: var TCompRes, op: TMagic) =
|
|||
of mAddU: binaryUintExpr(p, n, r, "+")
|
||||
of mSubU: binaryUintExpr(p, n, r, "-")
|
||||
of mMulU: binaryUintExpr(p, n, r, "*")
|
||||
of mDivU: binaryUintExpr(p, n, r, "/")
|
||||
of mDivU:
|
||||
binaryUintExpr(p, n, r, "/")
|
||||
if n[1].typ.skipTypes(abstractRange).size == 8:
|
||||
r.res = "Math.trunc($1)" % [r.res]
|
||||
of mDivI:
|
||||
arithAux(p, n, r, op)
|
||||
of mModI:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue