@@ -79,7 +79,7 @@ func (i *MemoryIterator[T]) GetAllKeys() []string {
}
func (i *MemoryIterator[T]) Key() string {
- if i.pos < 0 || i.pos > i.Count() || i.released {
+ if i.pos < 0 || i.pos >= i.Count() || i.released {
return ""
return i.k[i.pos]