db: fix memdb iterator

This commit is contained in:
Ethan Buchman
2017-08-25 16:35:37 -04:00
parent fe08fc00c8
commit 8f1dea89f5
2 changed files with 29 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func newMemDBIterator() *memDBIterator {
}
func (it *memDBIterator) Next() bool {
if it.last >= len(it.keys) {
if it.last >= len(it.keys)-1 {
return false
}
it.last++