fix(core): Fixes wrong offset for CircularBuffer (#344)

Bumps release version
This commit is contained in:
Kamron Batman 2020-12-11 16:46:38 -08:00 • committed by GitHub
parent 5e991f6fb5
commit 02d27036af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ namespace System.Buffers
throw new ArgumentOutOfRangeException(nameof(index)); 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 set
{ {
@ -57,7 +57,7 @@ namespace System.Buffers
} }
else else
{ {
_second[_first.Length - index] = value; _second[index - _first.Length] = value;
} }
} }
} }