Skip to content

Commit 6a2b638

Browse files
authored
Merge pull request #5 from inm-certi/master
Fix parser to work with empty lines after EOF
2 parents ba89a9a + ee4a0b9 commit 6a2b638

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/cz/jaybee/intelhex/Parser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ public void parse() throws IntelHexException, IOException {
217217
String recordStr;
218218

219219
while ((recordStr = reader.readLine()) != null) {
220+
// Ignore if this is a blank line.
221+
if (recordStr.isEmpty()) {
222+
continue;
223+
}
220224
Record record = parseRecord(recordStr);
221225
processRecord(record);
222226
recordIdx++;

0 commit comments

Comments
 (0)