1
1
mirror of https://github.com/walles/moar.git synced 2024-11-30 02:34:13 +03:00

Don't divide by zero

This commit is contained in:
Johan Walles 2024-05-18 07:52:20 +02:00
parent ee35c6b166
commit 856574c289

View File

@ -60,7 +60,7 @@ func (p *Pager) findFirstHit(startPosition linenumbers.LineNumber, beforePositio
}
if linesCount < chunkCount {
chunkCount = 0
chunkCount = 1
}
chunkSize := linesCount / chunkCount