mirror of
https://github.com/bloeys/nmage.git
synced 2025-12-29 05:18:21 +00:00
Fix iterator bug in Nex()
This commit is contained in:
@ -45,9 +45,10 @@ func (it *Iterator[T]) Next() (*T, Handle) {
|
||||
continue
|
||||
}
|
||||
|
||||
it.remainingItems--
|
||||
item := &it.registry.Items[it.currIndex]
|
||||
it.currIndex++
|
||||
return &it.registry.Items[it.currIndex], handle
|
||||
it.remainingItems--
|
||||
return item, handle
|
||||
}
|
||||
|
||||
// If we reached here means we iterated to the end and didn't find anything, which probably
|
||||
|
||||
Reference in New Issue
Block a user