diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-08-13 09:04:19 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2016-08-13 09:04:19 -0700 |
| commit | 7460de4a28cf53735c4b01d5cff23576becaba09 (patch) | |
| tree | 6383b9282c122f10889c2478c79dc3e5c1f3b9fe | |
| parent | 3b9fe41fe301d572eede9309bc9d724739425be2 (diff) | |
prog: generate ints outside of the specified range once in a while
| -rw-r--r-- | prog/rand.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/prog/rand.go b/prog/rand.go index f4e35ffb4..bd86a2f31 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -72,6 +72,9 @@ func (r *randGen) randInt() uintptr { } func (r *randGen) randRangeInt(begin int64, end int64) uintptr { + if r.oneOf(100) { + return r.randInt() + } return uintptr(begin + r.Int63n(end-begin+1)) } |
