From 4a928085fc4893e8d6af446dd085d5afdc745c08 Mon Sep 17 00:00:00 2001 From: Marc Robledo Date: Wed, 21 Aug 2024 08:37:20 +0200 Subject: [PATCH] hotfix (bps): fixed bps creation checksums --- rom-patcher-js/modules/RomPatcher.format.bps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rom-patcher-js/modules/RomPatcher.format.bps.js b/rom-patcher-js/modules/RomPatcher.format.bps.js index 9a2803c..ca8a4a3 100644 --- a/rom-patcher-js/modules/RomPatcher.format.bps.js +++ b/rom-patcher-js/modules/RomPatcher.format.bps.js @@ -1,4 +1,4 @@ -/* BPS module for Rom Patcher JS v20240721 - Marc Robledo 2016-2024 - http://www.marcrobledo.com/license */ +/* BPS module for Rom Patcher JS v20240821 - Marc Robledo 2016-2024 - http://www.marcrobledo.com/license */ /* File format specification: https://www.romhacking.net/documents/746/ */ const BPS_MAGIC='BPS1'; @@ -238,9 +238,9 @@ BPS.buildFromRoms=function(original, modified, deltaMode){ patch.actions=createBPSFromFilesLinear(original, modified); } - var patchFile=patch.export(); patch.sourceChecksum=original.hashCRC32(); patch.targetChecksum=modified.hashCRC32(); + var patchFile=patch.export(); patch.patchChecksum=patchFile.hashCRC32(0, patchFile.fileSize - 4); return patch; }