toHex: array indexing requires explicit bytes->int conversion

on latest devel
This commit is contained in:
mratsim 2018-03-01 13:43:42 +01:00
parent 6c300a2c6f
commit 18b8617d37
1 changed files with 2 additions and 2 deletions

View File

@ -116,5 +116,5 @@ proc toHex*[N: static[int]](ba: ByteArrayBE[N]): string {.noSideEffect.}=
result = newString(2*N) result = newString(2*N)
for i in 0 ..< N: for i in 0 ..< N:
result[2*i] = hexChars[ba[i] shr 4 and 0xF] result[2*i] = hexChars[int ba[i] shr 4 and 0xF]
result[2*i+1] = hexChars[ba[i] and 0xF] result[2*i+1] = hexChars[int ba[i] and 0xF]