mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 13:57:14 -05:00
Break CRO update check & overwrite to separate loops
This commit is contained in:
@@ -157,7 +157,7 @@ internal static bool rehashCRR(string PATH_CRR, string PATH_CRO, bool saveCRO =
|
||||
|
||||
updateTB(TB_Progress, "Hashes sorted, writing hashes to CRR.");
|
||||
|
||||
// Store Hashes in CRR
|
||||
// Loop to check which CROs have to be updated. Do this separate from overwriting so we don't overwrite hashes for other CROs (yet).
|
||||
int updatedCTR = 0;
|
||||
for (int i = 0; i < hashData.Length; i++)
|
||||
{
|
||||
@@ -170,8 +170,11 @@ internal static bool rehashCRR(string PATH_CRR, string PATH_CRO, bool saveCRO =
|
||||
updateTB(TB_Progress, String.Format("{0} hash has been updated.", Path.GetFileName(file)));
|
||||
updatedCTR++;
|
||||
}
|
||||
Array.Copy(hashData[i], 0, CRR, hashTableOffset + 0x20 * i, 0x20);
|
||||
}
|
||||
// Store Hashes in CRR
|
||||
for (int i = 0; i < hashData.Length; i++)
|
||||
Array.Copy(hashData[i], 0, CRR, hashTableOffset + 0x20 * i, 0x20);
|
||||
|
||||
updateTB(TB_Progress,
|
||||
updatedCTR > 0
|
||||
? String.Format("{0} hashes have been updated.", updatedCTR)
|
||||
|
||||
Reference in New Issue
Block a user