Skip to content

Commit

Permalink
Fixed ImpExpASCIITest failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dwvisser committed Dec 23, 2024
1 parent 18331d8 commit e7b0965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/jam/io/ImpExpASCII.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void getMaxChannelsXY(final int rows) throws IOException {
lnr.readLine();
}
try (final Scanner scanner = new Scanner(lnr)) {
for (int i = 0; i < rows; i++) {
for (int i = 0; i < rows && scanner.hasNextDouble(); i++) {
final double nval = scanner.nextDouble();
if (nval > maxX) {
maxX = (int) nval;
Expand Down Expand Up @@ -225,7 +225,7 @@ private void readHistXY(final InputStream inputStream, final String name,
lnr.readLine();
}
try (final Scanner scanner = new Scanner(lnr)) {
for (int i = 0; i < rows; i++) {
for (int i = 0; i < rows && scanner.hasNextDouble(); i++) {
final int channel = (int) scanner.nextDouble();
counts[channel] = scanner.nextDouble();
}
Expand Down

0 comments on commit e7b0965

Please sign in to comment.