Fix SIGFPE on shuffling for 0

This commit is contained in:
Mamy André-Ratsimbazafy 2019-05-09 12:01:01 +02:00
parent d7d594eee9
commit 8cfbfdf565
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,11 @@ func get_shuffled_seq*(seed: Eth2Digest,
##
## Invert the inner/outer loops from the spec, essentially. Most useful
## hash result re-use occurs within a round.
# Empty size -> empty list.
if list_size == 0:
return
var
# Share these buffers.
pivot_buffer: array[(32+1), byte]