diff --git a/core/src/processing/data/FloatList.java b/core/src/processing/data/FloatList.java index a22981a71..4c5022e7d 100644 --- a/core/src/processing/data/FloatList.java +++ b/core/src/processing/data/FloatList.java @@ -301,7 +301,7 @@ public class FloatList implements Iterable { if (index < 0) { throw new IllegalArgumentException("insert() index cannot be negative: it was " + index); } - if (index >= values.length) { + if (index >= data.length) { throw new IllegalArgumentException("insert() index " + index + " is past the end of this list"); } @@ -720,4 +720,4 @@ public class FloatList implements Iterable { sb.append(" ]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/core/src/processing/data/IntList.java b/core/src/processing/data/IntList.java index 29c1de3c3..6caa9686c 100644 --- a/core/src/processing/data/IntList.java +++ b/core/src/processing/data/IntList.java @@ -255,7 +255,7 @@ public class IntList implements Iterable { if (index < 0) { throw new IllegalArgumentException("insert() index cannot be negative: it was " + index); } - if (index >= values.length) { + if (index >= data.length) { throw new IllegalArgumentException("insert() index " + index + " is past the end of this list"); } @@ -725,4 +725,4 @@ public class IntList implements Iterable { sb.append(" ]"); return sb.toString(); } -} \ No newline at end of file +}