Fix paging output when using 'limit none'. Was showing large negative number. Fixes GH-147

This commit is contained in:
Paul Lorenz
2020-07-20 15:53:01 -04:00
parent d00e9a82d9
commit ae9734f39e
+1 -1
View File
@@ -137,7 +137,7 @@ func (p *paging) output(o *commonOptions) {
} else {
first := p.offset + 1
last := p.offset + p.limit
if last > p.count {
if last > p.count || last < 0 { // if p.limit is maxint, last will rollover and be negative
last = p.count
}
_, _ = fmt.Fprintf(o.Out, "results: %v-%v of %v\n", first, last, p.count)