mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
fixed important bugs while creating IPS patches and applying some BPS patches
This commit is contained in:
parent
860a2c33c4
commit
9d85db3baa
5 changed files with 24 additions and 10 deletions
4
ips.js
4
ips.js
|
@ -1,4 +1,4 @@
|
|||
/* IPS module for RomPatcher.js v20180919 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
|
||||
/* IPS module for RomPatcher.js v20180925 - Marc Robledo 2016-2018 - http://www.marcrobledo.com/license */
|
||||
/* File format specification: http://www.smwiki.net/wiki/IPS_file_format */
|
||||
|
||||
var MAX_IPS_SIZE=16777216;
|
||||
|
@ -169,7 +169,7 @@ function createIPSFromFiles(original, modified){
|
|||
/* force length to be 0xffff-6 bytes to keep IPS standard */
|
||||
var nearbyDifference=true;
|
||||
while(nearbyDifference && length<(0xffff-6)){
|
||||
if(seek+6>modified.fileSize){
|
||||
if((seek+6)>=modified.fileSize){
|
||||
var finalSeek=modified.fileSize-seek-1;
|
||||
length+=finalSeek;
|
||||
seek+=finalSeek;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue