avoid ArrayOutOfBoundsException

git-svn-id: http://google-refine.googlecode.com/svn/trunk@484 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-15 20:24:23 +00:00
parent 397861b612
commit 1e5a787281

View File

@ -162,7 +162,7 @@ public class NumericBinIndex {
_bins = new int[(int) Math.round(binCount)];
for (double d : allValues) {
int bin = (int) Math.floor((d - _min) / _step);
int bin = Math.max((int) Math.floor((d - _min) / _step),0);
_bins[bin]++;
}
}