Skip to content

Commit

Permalink
ips.c: Remove duplicate lines
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Aug 20, 2019
1 parent 35b63cb commit a0da9f4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions retail/bootloader/source/arm7/ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,11 @@ void applyIpsPatch(const tNDSHeader* ndsHeader, u8* ipsbyte, bool higherMem, int
}
rombyte -= ndsHeader->arm9romOffset+ndsHeader->arm9binarySize;
}
ipson++;
ipson++;
ipson++;
ipson += 3;
if (ipsbyte[ipson] * 256 + ipsbyte[ipson + 1] == 0) {
ipson++;
ipson++;
ipson += 2;
totalrepeats = ipsbyte[ipson] * 256 + ipsbyte[ipson + 1];
ipson++;
ipson++;
ipson += 2;
u8 repeatbyte[totalrepeats];
for (int ontime = 0; ontime < totalrepeats; ontime++) {
repeatbyte[ontime] = ipsbyte[ipson];
Expand All @@ -46,8 +42,7 @@ void applyIpsPatch(const tNDSHeader* ndsHeader, u8* ipsbyte, bool higherMem, int
ipson++;
} else {
totalrepeats = ipsbyte[ipson] * 256 + ipsbyte[ipson + 1];
ipson++;
ipson++;
ipson += 2;
tonccpy(rombyte+offset, ipsbyte+ipson, totalrepeats);
ipson += totalrepeats;
}
Expand Down

0 comments on commit a0da9f4

Please sign in to comment.