From f898587a73df0fab8f2dc0ab7b63c50b001eb06b Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Thu, 29 Jan 2015 01:12:00 -0800 Subject: [PATCH] tweak --- runes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runes.go b/runes.go index 7be5d73..a283fdd 100644 --- a/runes.go +++ b/runes.go @@ -69,8 +69,9 @@ func (arb T) Runes(args ...interface{}) []rune { // Construct the arbitrary []rune. arbitrary_runes := make([]rune, num_arbitrary_runes) + l := len(runes) for i,_ := range arbitrary_runes { - arbitrary_runes[i] = runes[arb.randomness.Intn(num_arbitrary_runes)] + arbitrary_runes[i] = runes[arb.randomness.Intn(l)] } // Return.