Skip to content

Commit

Permalink
Don't hang if we hit the end of stream while waiting for a data record.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Jan 27, 2020
1 parent 065257b commit a8eca06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/decoders/decoders.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ void AbstractDecoder::decodeToSectors(Track& track)
r = advanceToNextRecord();
if (r != UNKNOWN_RECORD)
break;
fmr.readNextMatchingOpcode(F_OP_PULSE);
if (fmr.readNextMatchingOpcode(F_OP_PULSE) == 0)
break;
}
recordStart = fmr.tell();
if (r == DATA_RECORD)
Expand Down

0 comments on commit a8eca06

Please sign in to comment.