+ Fixed bug in defragmenting block table

This commit is contained in:
unknown
2015-05-04 10:23:46 +02:00
parent b7ad3dd767
commit 9c0f0db993

View File

@@ -785,11 +785,14 @@ static int BuildFileTableFromBlockTable(
// Fix the pointer in the hash entry
pHash->dwBlockIndex = dwNewIndex;
// Dump the relocation entry
printf("Relocating hash entry %08X-%08X: %08X -> %08X\n", pHash->dwName1, pHash->dwName2, dwBlockIndex, dwNewIndex);
}
// Get the pointer to the file entry and the block entry
pFileEntry = ha->pFileTable + dwNewIndex;
pBlock = pBlockTable + dwNewIndex;
pBlock = pBlockTable + dwBlockIndex;
// ByteOffset is only valid if file size is not zero
pFileEntry->ByteOffset = pBlock->dwFilePos;