]> git.saurik.com Git - hfs.git/commitdiff
Separate dataExtents / rsrcExtents (gcc noticed). master
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 16 Dec 2013 12:47:45 +0000 (04:47 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 16 Dec 2013 12:47:45 +0000 (04:47 -0800)
fsck_hfs/dfalib/hfs_endian.c

index 74c66e636c53e46b606f78fca56bbb154ccfb81e..88752c59a4eb7d250522ba85182399bc8dddd976 100755 (executable)
@@ -1071,9 +1071,11 @@ hfs_swap_HFSBTInternalNode (
                 srcRec->clumpSize                      = SWAP_BE16 (srcRec->clumpSize);
                 
                 /* Swap the two sets of extents as an array of six (three each) UInt16 */
-                for (j = 0; j < kHFSExtentDensity * 2; j++) {
+                for (j = 0; j < kHFSExtentDensity; j++) {
                     srcRec->dataExtents[j].startBlock  = SWAP_BE16 (srcRec->dataExtents[j].startBlock);
                     srcRec->dataExtents[j].blockCount  = SWAP_BE16 (srcRec->dataExtents[j].blockCount);
+                    srcRec->rsrcExtents[j].startBlock  = SWAP_BE16 (srcRec->rsrcExtents[j].startBlock);
+                    srcRec->rsrcExtents[j].blockCount  = SWAP_BE16 (srcRec->rsrcExtents[j].blockCount);
                 }
     
                 /* Don't swap srcRec->reserved */