From 08ed81af34882ebad21540c6f25a60c6ee51b029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 9 Feb 2020 23:05:23 +0100 Subject: [PATCH] Don't forget to exit when dumpingraw integer --- constantine/io.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constantine/io.nim b/constantine/io.nim index 042e647..e010831 100644 --- a/constantine/io.nim +++ b/constantine/io.nim @@ -133,7 +133,7 @@ func dumpRawUintLE( dst_idx += sizeof(Word) tail -= sizeof(Word) else: - # Process the tail + # Process the tail and exit when cpuEndian == littleEndian: # When requesting little-endian on little-endian platform # we can just copy each byte @@ -143,6 +143,7 @@ func dumpRawUintLE( # We need to copy from the end for i in 0 ..< tail: dst[dst_idx] = byte(lo shr (tail-i)) + return func dumpRawUint*( dst: var openarray[byte],