in prepration for the upcoming different integer inference rules
This commit is contained in:
parent
28bdf0ac80
commit
2b592a6425
2 changed files with 2 additions and 2 deletions
|
|
@ -669,7 +669,7 @@ proc astGenRepr*(n: NimNode): string {.compileTime, benign.} =
|
||||||
t = x
|
t = x
|
||||||
result = newString(len)
|
result = newString(len)
|
||||||
for j in countdown(len-1, 0):
|
for j in countdown(len-1, 0):
|
||||||
result[j] = HexChars[t and 0xF]
|
result[j] = HexChars[int(t and 0xF)]
|
||||||
t = t shr 4
|
t = t shr 4
|
||||||
# handle negative overflow
|
# handle negative overflow
|
||||||
if t == 0 and x < 0: t = -1
|
if t == 0 and x < 0: t = -1
|
||||||
|
|
|
||||||
|
|
@ -888,7 +888,7 @@ proc toHex*(x: BiggestInt, len: Positive): string {.noSideEffect,
|
||||||
n = x
|
n = x
|
||||||
result = newString(len)
|
result = newString(len)
|
||||||
for j in countdown(len-1, 0):
|
for j in countdown(len-1, 0):
|
||||||
result[j] = HexChars[n and 0xF]
|
result[j] = HexChars[int(n and 0xF)]
|
||||||
n = n shr 4
|
n = n shr 4
|
||||||
# handle negative overflow
|
# handle negative overflow
|
||||||
if n == 0 and x < 0: n = -1
|
if n == 0 and x < 0: n = -1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue