[client.keyset] included maxDepth() in random depth generation

This commit is contained in:
xdrm-brackets 2018-04-23 18:02:19 +02:00
parent 499e24fbba
commit dc566d0942
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ func (s *T) generate() {
var randMin, randMax = s.ctx.MinDepth() + (s.ctx.MaxDepth()-s.ctx.MinDepth()) / 2, s.ctx.MaxDepth()
/* (2) Select "random" depth */
s.depth = randMin + uint16(rand.Intn(int(randMax-randMin)))
s.depth = randMin + uint16(rand.Intn(int(randMax+1-randMin)))
/* (3) Reset comsumption level */
s.mcode = 0