xuty 4 vuotta sitten
vanhempi
sitoutus
02ceb5e3d4
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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);
     }