forked from ddrilling/AsbCloudServer
Add IndexOutOfRangeException to CyclycArray indexer.
This commit is contained in:
parent
013e643da5
commit
1c4a2f7922
@ -91,7 +91,7 @@ namespace System.Collections.Generic
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (used == 0)
|
if (used == 0)
|
||||||
return default;
|
throw new IndexOutOfRangeException();
|
||||||
|
|
||||||
var i = (current + 1 + index) % used;
|
var i = (current + 1 + index) % used;
|
||||||
return array[i];
|
return array[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user