diff --git a/src/git.xdrm.io/schastsp/client/keyset/keyset.internal.go b/src/git.xdrm.io/schastsp/client/keyset/keyset.internal.go index 1d3819d..9991bb1 100644 --- a/src/git.xdrm.io/schastsp/client/keyset/keyset.internal.go +++ b/src/git.xdrm.io/schastsp/client/keyset/keyset.internal.go @@ -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