fix(core): Fixes wrong offset for CircularBuffer (#344)
Bumps release version
This commit is contained in:
parent
5e991f6fb5
commit
02d27036af
1 changed files with 2 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ namespace System.Buffers
|
|||
throw new ArgumentOutOfRangeException(nameof(index));
|
||||
}
|
||||
|
||||
return index < _first.Length ? _first[index] : _second[_first.Length - index];
|
||||
return index < _first.Length ? _first[index] : _second[index - _first.Length];
|
||||
}
|
||||
set
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ namespace System.Buffers
|
|||
}
|
||||
else
|
||||
{
|
||||
_second[_first.Length - index] = value;
|
||||
_second[index - _first.Length] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue