in prepration for the upcoming different integer inference rules

This commit is contained in:
Andreas Rumpf 2017-09-16 10:29:29 +02:00
commit 2b592a6425
2 changed files with 2 additions and 2 deletions

View file

@ -888,7 +888,7 @@ proc toHex*(x: BiggestInt, len: Positive): string {.noSideEffect,
n = x
result = newString(len)
for j in countdown(len-1, 0):
result[j] = HexChars[n and 0xF]
result[j] = HexChars[int(n and 0xF)]
n = n shr 4
# handle negative overflow
if n == 0 and x < 0: n = -1