Lines 1277-1293
Link Here
|
1277 |
ecrec64_start_offset = (zusz_t)makeint64(&byterecL[OFFSET_START_EOCDR64]); |
1277 |
ecrec64_start_offset = (zusz_t)makeint64(&byterecL[OFFSET_START_EOCDR64]); |
1278 |
ecloc64_total_disks = (zuvl_t)makelong(&byterecL[NUM_THIS_DISK_LOC64]); |
1278 |
ecloc64_total_disks = (zuvl_t)makelong(&byterecL[NUM_THIS_DISK_LOC64]); |
1279 |
|
1279 |
|
1280 |
/* Check for consistency */ |
1280 |
/* Check for consistency */ |
1281 |
#ifdef TEST |
1281 |
#ifdef TEST |
1282 |
fprintf(stdout,"\nnumber of disks (ECR) %u, (ECLOC64) %lu\n", |
1282 |
fprintf(stdout,"\nnumber of disks (ECR) %u, (ECLOC64) %lu\n", |
1283 |
G.ecrec.number_this_disk, ecloc64_total_disks); fflush(stdout); |
1283 |
G.ecrec.number_this_disk, ecloc64_total_disks); fflush(stdout); |
1284 |
#endif |
1284 |
#endif |
1285 |
if ((G.ecrec.number_this_disk != 0xFFFF) && |
1285 |
if ((G.ecrec.number_this_disk != 0xFFFF) && ecloc64_total_disks && |
1286 |
(G.ecrec.number_this_disk != ecloc64_total_disks - 1)) { |
1286 |
(G.ecrec.number_this_disk != ecloc64_total_disks - 1)) { |
1287 |
/* Note: For some unknown reason, the developers at PKWARE decided to |
1287 |
/* Note: For some unknown reason, the developers at PKWARE decided to |
1288 |
store the "zip64 total disks" value as a counter starting from 1, |
1288 |
store the "zip64 total disks" value as a counter starting from 1, |
1289 |
whereas all other "split/span volume" related fields use 0-based |
1289 |
whereas all other "split/span volume" related fields use 0-based |
1290 |
volume numbers. Sigh... */ |
1290 |
volume numbers. Sigh... */ |
1291 |
/* When the total number of disks as found in the traditional ecrec |
1291 |
/* When the total number of disks as found in the traditional ecrec |
1292 |
is not 0xFFFF, the disk numbers in ecrec and ecloc64 must match. |
1292 |
is not 0xFFFF, the disk numbers in ecrec and ecloc64 must match. |
1293 |
When this is not the case, the found ecrec64 locator cannot be valid. |
1293 |
When this is not the case, the found ecrec64 locator cannot be valid. |