xuty пре 4 година
родитељ
комит
02ceb5e3d4
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      lib/utli/circular_list.dart

+ 2 - 2
lib/utli/circular_list.dart

@@ -59,7 +59,7 @@ class CircularList<T> {
   }
 
   T operator [](int index) {
-    if (index > length - 1) {
+    if (index >= length) {
       throw RangeError.range(index, 0, length - 1);
     }
 
@@ -67,7 +67,7 @@ class CircularList<T> {
   }
 
   operator []=(int index, T value) {
-    if (index > length - 1) {
+    if (index >= length) {
       throw RangeError.range(index, 0, length - 1);
     }