Selaa lähdekoodia

Fix CD-ROM leadout LBA with BIN/CUE images

E.g. if the last track has 1000 sectors, the valid LBAs are 0 to 999
and the leadout should start at LBA 1000.
Petteri Aimonen 2 vuotta sitten
vanhempi
sitoutus
fd689d6ba5
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/BlueSCSI_cdrom.cpp

+ 1 - 1
src/BlueSCSI_cdrom.cpp

@@ -230,7 +230,7 @@ static uint32_t getLeadOutLBA(const CUETrackInfo* lasttrack)
         image_config_t &img = *(image_config_t*)scsiDev.target->cfg;
         uint32_t lastTrackBlocks = (img.file.size() - lasttrack->file_offset)
                 / lasttrack->sector_length;
-        return lasttrack->track_start + lastTrackBlocks + 1;
+        return lasttrack->track_start + lastTrackBlocks;
     }
     else
     {