Skip to content

Commit 156660f

Browse files
committed
Fix ChaCha reseed
1 parent 20938cf commit 156660f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/RandomKit/Types/RandomGenerator/ChaCha.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public struct ChaCha: RandomBytesGenerator, SeedableFromOtherRandomGenerator {
118118
_state.13 = 0
119119
_state.14 = 0
120120
_state.15 = 0
121+
_index = ChaCha._stateCount
121122
}
122123

123124
private mutating func _update() {

0 commit comments

Comments
 (0)