Skip to content

Commit

Permalink
Fix the occasional loss of logs
Browse files Browse the repository at this point in the history
  • Loading branch information
peacewong committed Nov 25, 2023
1 parent 5616acc commit 7f1807a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class LoopArray[T](maxCapacity: Int) {
} else if (index > _max) {
throw new IllegalArgumentException("The index " + index + " must be less than " + _max)
}
val _index = (flag + (index - realSize)) % maxCapacity
val _index = (flag + (index - realSize + maxCapacity - 1)) % maxCapacity
eventQueue(_index).asInstanceOf[T]
}

Expand Down

0 comments on commit 7f1807a

Please sign in to comment.