From a6f7d48b2fd18c958f67f14e28fa2c594784bc95 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 16 Dec 2013 04:47:45 -0800 Subject: [PATCH] Separate dataExtents / rsrcExtents (gcc noticed). --- fsck_hfs/dfalib/hfs_endian.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fsck_hfs/dfalib/hfs_endian.c b/fsck_hfs/dfalib/hfs_endian.c index 74c66e6..88752c5 100755 --- a/fsck_hfs/dfalib/hfs_endian.c +++ b/fsck_hfs/dfalib/hfs_endian.c @@ -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 */ -- 2.45.2