We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afe12e9 commit 53a0348Copy full SHA for 53a0348
2 files changed
core/src/processing/data/FloatDict.java
@@ -671,6 +671,9 @@ public int size() {
671
if (useKeys) {
672
return count; // don't worry about NaN values
673
674
+ } else if (count == 0) { // skip the NaN check, it'll AIOOBE
675
+ return 0;
676
+
677
} else { // first move NaN values to the end of the list
678
int right = count - 1;
679
while (values[right] != values[right]) {
core/src/processing/data/FloatList.java
@@ -566,6 +566,10 @@ public void sortReverse() {
566
new Sort() {
567
@Override
568
public int size() {
569
+ // if empty, don't even mess with the NaN check, it'll AIOOBE
570
+ if (count == 0) {
571
572
+ }
573
// move NaN values to the end of the list and don't sort them
574
575
while (data[right] != data[right]) {
0 commit comments