Skip to content

Commit

Permalink
Make sure we never check values outside _logSize queue (#220)
Browse files Browse the repository at this point in the history
* Make sure we never check values outside _logSize queue

* Do not use unsupported API
  • Loading branch information
konraddysput authored Jun 26, 2024
1 parent 33fe16b commit ecadffe
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ private long GetNextStartPosition()
int nextLineBytes = NewRow.Length;
while (numberOfFreeBytes < expectedFreedBytes)
{
if (_logSize.Count == 0)
{
return numberOfFreeBytes;
}

numberOfFreeBytes += (_logSize.Dequeue() + nextLineBytes);
}

Expand Down

0 comments on commit ecadffe

Please sign in to comment.