Corrected bug, was checking for sector after ending data, on uninitialized queue.

This commit is contained in:
2014-03-15 18:53:54 +00:00
parent 24dce6c8cf
commit 418b09ab83
3 changed files with 6 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
edccchk v1.20 edccchk v1.25
============= =============
EDC/ECC checker for RAW (2352 bytes/sector) CD images EDC/ECC checker for RAW (2352 bytes/sector) CD images
@@ -44,6 +44,9 @@ Changelog
* Shows a warning when mode 2 subheader copies differ. Other tools detect this as an error, but if both ECC and EDC are ok it's intentional. * Shows a warning when mode 2 subheader copies differ. Other tools detect this as an error, but if both ECC and EDC are ok it's intentional.
* Shows summary of total warnings and total errors+warnings. * Shows summary of total warnings and total errors+warnings.
2014/03/15 v1.25
* Corrected mishandling of end of data. It was checking for a sector on what should be uninitialized memory instead of breaking main loop.
To-Do To-Do
===== =====

View File

@@ -304,8 +304,6 @@ static int8_t ecmify(
DPRINTF("ecmify(): Entering main loop.\n"); DPRINTF("ecmify(): Entering main loop.\n");
for(;;) { for(;;) {
int8_t detecttype = 0;
// //
// Refill queue if necessary // Refill queue if necessary
// //
@@ -354,8 +352,7 @@ static int8_t ecmify(
// //
// No data left to read -> quit // No data left to read -> quit
// //
detecttype = -1; break;
} }
uint8_t* sector = queue + queue_start_ofs; uint8_t* sector = queue + queue_start_ofs;
@@ -489,12 +486,6 @@ static int8_t ecmify(
nondatasectors++; nondatasectors++;
} }
//
// Current type is negative ==> quit
//
if(detecttype < 0) { break; }
// //
// Advance to the next sector // Advance to the next sector
// //

View File

@@ -1 +1 @@
"v1.20" "v1.25"