diff --git a/src/main/java/jam/sort/GainCalibration.java b/src/main/java/jam/sort/GainCalibration.java index 6ac405a0..2a7bde82 100644 --- a/src/main/java/jam/sort/GainCalibration.java +++ b/src/main/java/jam/sort/GainCalibration.java @@ -150,7 +150,10 @@ private void readGains(final InputStream input, final int rows, final StreamTokenizer tokenizer = new StreamTokenizer(lnr); tokenizer.eolIsSignificant(false); for (int i = 0; i < rows; i++) { - tokenizer.nextToken(); + final int ttype = tokenizer.nextToken(); + if (ttype == StreamTokenizer.TT_EOF) { + break; + } final int parameter = (int) tokenizer.nval; tokenizer.nextToken(); final double gain = tokenizer.nval;