Skip to content

Commit cf2fba7

Browse files
committed
fix: fix for rand.Intn() when selecting a possible value
1 parent 4765cbb commit cf2fba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/data_generator/datagenerator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func AddObservationForPerson(conceptId int64, concept Concept, personId int64) {
278278
max := len(concept.PossibleValues)
279279
randIndex := 0
280280
if max > 1 {
281-
randIndex = rand.Intn(max - 1)
281+
randIndex = rand.Intn(max)
282282
}
283283
valueAsNumber = concept.PossibleValues[randIndex]
284284
}

0 commit comments

Comments
 (0)