Don't spin in an infinite loop if the decoder tries to find a data record and

the matcher fails to find anything, leaving the seek point unchanged.
This commit is contained in:
David Given
2021-12-10 19:56:00 +00:00
parent 2584a25527
commit 3d1ee7a43e
4 changed files with 11 additions and 0 deletions

View File

@@ -114,6 +114,8 @@ public:
auto idbits = readRawBits(16);
const Bytes idbytes = decodeFmMfm(idbits);
uint8_t id = idbytes.slice(0, 1)[0];
if (eof())
return RecordType::UNKNOWN_RECORD;
seek(here);
switch (id)