1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-06-27 16:25:54 +00:00

hotfix (bps): fixed bps creation checksums

This commit is contained in:
Marc Robledo 2024-08-21 08:37:20 +02:00
parent 1b7521feeb
commit 4a928085fc

View file

@ -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;
}