Skip to content

Commit

Permalink
Merge pull request #1 from martianboy/patch-1
Browse files Browse the repository at this point in the history
Don't let index go further than size of allFiles in HamshahriReader
  • Loading branch information
mojtaba-khallash committed Nov 21, 2014
2 parents 3addf80 + 12a8651 commit 1b7fbb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion JHazm/src/JHazm/HamshahriReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ protected void yieldNextCore() {
if (!isOpen) {
do {
index++;
if (index >= allFiles.size()) {
yieldBreak();
return;
}
file = new File(allFiles.get(index));
} while (getInvalidFiles().contains(file.getName()));
}
Expand Down Expand Up @@ -178,4 +182,4 @@ protected void yieldNextCore() {
}
}
}
}
}

0 comments on commit 1b7fbb3

Please sign in to comment.