Skip to content

Commit

Permalink
Fixed infinite loop while iterating entries.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenwenzel committed Dec 16, 2024
1 parent 1341408 commit aaebd58
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ class KvinLevelDb(path: File) extends KvinLevelDbBase with Kvin {
}

override def computeNext: Option[URI] = {
val entry = it.next
val key = entry.getKey
var done = false
var result: Option[URI] = None
while (it.hasNext && !done) {
val entry = it.next
val key = entry.getKey
if (key.startsWith(prefix) && count < limit) {
val itemId = entry.getValue
System.arraycopy(itemId, 0, valuesPrefix, 0, itemId.length)
Expand Down

0 comments on commit aaebd58

Please sign in to comment.