0
0

Merge pull request #418 from dtylman/master

fix for #416
This commit is contained in:
Marty Schoch 2016-09-11 20:26:24 -04:00 committed by GitHub
commit 5cf50ec338

View File

@ -40,6 +40,9 @@ func (c *collectStoreHeap) RemoveLast() *search.DocumentMatch {
func (c *collectStoreHeap) Final(skip int, fixup collectorFixup) (search.DocumentMatchCollection, error) {
count := c.Len()
size := count - skip
if size <= 0 {
return make(search.DocumentMatchCollection, 0), nil
}
rv := make(search.DocumentMatchCollection, size)
for count > 0 {
count--