flopimg: don't fault on nibble extraction on degenerated tracks

This commit is contained in:
Olivier Galibert 2021-03-02 08:43:43 +01:00
parent eb2ea5d355
commit 1c177c16a6

View File

@ -2391,7 +2391,8 @@ std::vector<uint8_t> floppy_image_format_t::generate_nibbles_from_bitstream(cons
}
pos += 8;
}
pos -= bitstream.size();
while(pos >= bitstream.size())
pos -= bitstream.size();
while(pos < bitstream.size() && bitstream[pos] == 0)
pos++;
found: