xuty 4 éve
szülő
commit
02ceb5e3d4
1 módosított fájl, 2 hozzáadás és 2 törlés
  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);
     }