mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-07-17 16:38:31 +00:00
fix the glitch that cut the end of the file if it's larger than the changed file patch was originally created with
This commit is contained in:
parent
84298e9cee
commit
3dd109c6d9
1 changed files with 6 additions and 1 deletions
|
@ -57,6 +57,11 @@ UPS.prototype.apply=function(romFile, validate){
|
|||
throw new Error('error_crc_input');
|
||||
}
|
||||
|
||||
/* fix the glitch that cut the end of the file if it's larger than the changed file patch was originally created with */
|
||||
sizeOutput = this.sizeOutput
|
||||
if(!validate && sizeOutput < this.sizeInput){
|
||||
sizeOutput = this.sizeInput
|
||||
}
|
||||
|
||||
/* copy original file */
|
||||
tempFile=new MarcFile(this.sizeOutput);
|
||||
|
@ -201,4 +206,4 @@ function createUPSFromFiles(original, modified){
|
|||
patch.checksumInput=crc32(original);
|
||||
patch.checksumOutput=crc32(modified);
|
||||
return patch
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue