Applied Chrono's UPS Fix patch
This commit is contained in:
parent
2e608ad0ba
commit
592843e4f4
|
@ -232,16 +232,25 @@ static bool patchApplyUPS(const char *patchname, u8 **rom, int *size)
|
|||
s64 dstSize = readVarPtr(f);
|
||||
|
||||
if (crc == srcCRC) {
|
||||
dataSize = srcSize;
|
||||
} else if (crc == dstCRC) {
|
||||
if (srcSize != *size) {
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
dataSize = dstSize;
|
||||
} else if (crc == dstCRC) {
|
||||
if (dstSize != *size) {
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
dataSize = srcSize;
|
||||
} else {
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
if (dataSize != *size) {
|
||||
fclose(f);
|
||||
return false;
|
||||
if (dataSize > *size) {
|
||||
*rom = (u8*)realloc(*rom, dataSize);
|
||||
memset(*rom + *size, 0, dataSize - *size);
|
||||
*size = dataSize;
|
||||
}
|
||||
|
||||
s64 relative = 0;
|
||||
|
|
Loading…
Reference in New Issue