From 57396065ce1a3990a91100e528cfcb99bdac9b4c Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Wed, 1 Nov 2017 19:53:09 +0100 Subject: [PATCH] Fix for latest Nim --- src/uuids.nim | 5 +++-- uuids.nimble | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/uuids.nim b/src/uuids.nim index 4a1f034..3127c31 100644 --- a/src/uuids.nim +++ b/src/uuids.nim @@ -10,10 +10,11 @@ type template toHex(s: string, start: Natural, x: BiggestInt, len: Positive) = - const HexChars = "0123456789abcdef" + const HexChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', + '9', 'a', 'b', 'c', 'd', 'e', 'f'] var n = x for j in countdown(len - 1, 0): - s[start + j] = HexChars[n and 0xF] + s[start + j] = HexChars[int(n and 0xF)] n = n shr 4 # handle negative overflow if n == 0 and x < 0: n = -1 diff --git a/uuids.nimble b/uuids.nimble index 7a5c79a..a670f52 100644 --- a/uuids.nimble +++ b/uuids.nimble @@ -1,6 +1,6 @@ [Package] name: "uuids" -version: "0.1.7" +version: "0.1.8" author: "Xored Software, Inc." description: "UUID library" license: "MIT"