Skip to content

Conversation

@huitseeker
Copy link
Contributor

When called with n == 0 (aka asked to produce a vector of random numbers of size 0)
rand_vector falls through to its final panic.

This special-cases n == 0 to return an empy vector instead.

This fixes 0xMiden/miden-vm#1314

When called with `n == 0` (aka asked to produce a vector of random numbers of size 0)
`rand_vector` falls through to its final panic.

This special-cases n == 0 to return an empy vector instead.
Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you for fixing it!

@irakliyk irakliyk merged commit 07ca0b8 into facebook:main Jul 19, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test sha256_hash_memory is flaky

2 participants