Skip to content

Commit

Permalink
fix: RingBuffer - minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyakunin committed Dec 8, 2023
1 parent 6211649 commit e5982f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Stl/Collections/RingBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void MoveHead(int skipCount)
throw new ArgumentOutOfRangeException(nameof(skipCount));

var newStart = (_start + skipCount) & Capacity;
if (newStart > _start)
if (newStart >= _start)
_buffer.AsSpan(_start, newStart - _start).Clear();
else {
_buffer.AsSpan(_start).Clear();
Expand Down

0 comments on commit e5982f5

Please sign in to comment.