more NaN check business

This commit is contained in:
Ben Fry
2014-08-02 07:38:34 -04:00
parent 7dadaed210
commit 8405fdcc4f
2 changed files with 7 additions and 0 deletions

View File

@@ -671,6 +671,9 @@ public class FloatDict {
if (useKeys) {
return count; // don't worry about NaN values
} else if (count == 0) { // skip the NaN check, it'll AIOOBE
return 0;
} else { // first move NaN values to the end of the list
int right = count - 1;
while (values[right] != values[right]) {