mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 13:33:10 +00:00
fixes RandomChunker not respecting padding (#1170)
This commit is contained in:
parent
0032e60398
commit
0ec52abc98
@ -33,10 +33,10 @@ proc new*(
|
||||
return 0
|
||||
|
||||
var read = 0
|
||||
while read < len:
|
||||
while read < len and (pad or read < size - consumed):
|
||||
rng.shuffle(alpha)
|
||||
for a in alpha:
|
||||
if read >= len:
|
||||
if read >= len or (not pad and read >= size - consumed):
|
||||
break
|
||||
|
||||
data[read] = a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user