From 2b592a64259e4f66b0ad5dd7264f7b524c309fee Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 16 Sep 2017 10:29:29 +0200 Subject: [PATCH] in prepration for the upcoming different integer inference rules --- lib/core/macros.nim | 2 +- lib/pure/strutils.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 3cfefb5c1c..e88002c7b9 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -669,7 +669,7 @@ proc astGenRepr*(n: NimNode): string {.compileTime, benign.} = t = x result = newString(len) for j in countdown(len-1, 0): - result[j] = HexChars[t and 0xF] + result[j] = HexChars[int(t and 0xF)] t = t shr 4 # handle negative overflow if t == 0 and x < 0: t = -1 diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 2a64e70d96..8b4e6bd05c 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -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