Don't forget to exit when dumpingraw integer

This commit is contained in:
Mamy André-Ratsimbazafy 2020-02-09 23:05:23 +01:00
parent a389e5c38c
commit 08ed81af34
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 2 additions and 1 deletions

View File

@ -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],