mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 01:52:29 -06:00
Check for EOF
This commit is contained in:
parent
2778801dc5
commit
d0b54e9939
1 changed files with 5 additions and 0 deletions
|
@ -543,6 +543,11 @@ void NCCHContainer::ApplyIPS(std::vector<u8>& ips, std::vector<u8>& buffer) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (cursor < patch_length) {
|
while (cursor < patch_length) {
|
||||||
|
std::string eof_check(ips.begin() + cursor, ips.begin() + cursor + 3);
|
||||||
|
|
||||||
|
if (eof_check == "EOF")
|
||||||
|
return;
|
||||||
|
|
||||||
u32 offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
u32 offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2];
|
||||||
std::size_t length = ips[cursor + 3] << 8 | ips[cursor + 4];
|
std::size_t length = ips[cursor + 3] << 8 | ips[cursor + 4];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue