File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ AbstractDecoder::RecordType AmigaDecoder::advanceToNextRecord()
3232void AmigaDecoder::decodeSectorRecord ()
3333{
3434 const auto & rawbits = readRawBits (AMIGA_RECORD_SIZE*16 );
35+ if (rawbits.size () < (AMIGA_RECORD_SIZE*16 ))
36+ return ;
3537 const auto & rawbytes = toBytes (rawbits).slice (0 , AMIGA_RECORD_SIZE*2 );
3638 const auto & bytes = decodeFmMfm (rawbits).slice (0 , AMIGA_RECORD_SIZE);
3739
Original file line number Diff line number Diff line change @@ -261,13 +261,13 @@ void readDiskCommand(AbstractDecoder& decoder)
261261 if (dumpSectors)
262262 {
263263 std::cout << " \n Decoded sectors follow:\n\n " ;
264- for (auto & i : readSectors )
264+ for (auto & sector : track-> sectors )
265265 {
266- auto & sector = i. second ;
267- std::cout << fmt::format ( " {}.{:02}.{:02}: I+{:.2f}us with {:.2f}us clock \n " ,
268- sector-> logicalTrack , sector-> logicalSide , sector-> logicalSector ,
269- sector-> position . ns () / 1000.0 , sector-> clock / 1000.0 );
270- hexdump (std::cout, sector-> data );
266+ std::cout << fmt::format ( " {}.{:02}.{:02}: I+{:.2f}us with {:.2f}us clock: status {} \n " ,
267+ sector. logicalTrack , sector. logicalSide , sector. logicalSector ,
268+ sector. position . ns () / 1000.0 , sector. clock / 1000.0 ,
269+ sector. status );
270+ hexdump (std::cout, sector. data );
271271 std::cout << std::endl;
272272 }
273273 }
You can’t perform that action at this time.
0 commit comments