xuty hace 4 años
padre
commit
02ceb5e3d4
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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);
     }