diff --git a/src/core/file_sys/ncch_container.cpp b/src/core/file_sys/ncch_container.cpp index 4f23d9fdd..34f98e9fe 100644 --- a/src/core/file_sys/ncch_container.cpp +++ b/src/core/file_sys/ncch_container.cpp @@ -491,7 +491,7 @@ Loader::ResultStatus NCCHContainer::LoadSectionExeFS(const char* name, std::vect if (ips_file.IsOpen() && ips_file.ReadBytes(&ips[0], ips_file_size) == ips_file_size) { - LOG_WARNING(Service_FS, "File {} patching code.bin", override_ips); + LOG_INFO(Service_FS, "File {} patching code.bin", override_ips); ApplyIPS(ips, buffer); } } @@ -534,13 +534,13 @@ Loader::ResultStatus NCCHContainer::LoadOverrideExeFSSection(const char* name, return Loader::ResultStatus::ErrorNotUsed; } -Loader::ResultStatus NCCHContainer::ApplyIPS(std::vector& ips, std::vector& buffer) { +void NCCHContainer::ApplyIPS(std::vector& ips, std::vector& buffer) { u32 cursor = 5; u32 patch_length = ips.size() - 3; std::string ips_header(ips.begin(), ips.begin() + 5); - if (strcmp(ips_header.c_str(), "PATCH") != 0) - return Loader::ResultStatus::Error; + if (ips_header != "PATCH") + return; while (cursor < patch_length) { u32 offset = ips[cursor] << 16 | ips[cursor + 1] << 8 | ips[cursor + 2]; @@ -549,8 +549,6 @@ Loader::ResultStatus NCCHContainer::ApplyIPS(std::vector& ips, std::vector& romfs_file) { diff --git a/src/core/file_sys/ncch_container.h b/src/core/file_sys/ncch_container.h index 8d6665e7a..098b8df8f 100644 --- a/src/core/file_sys/ncch_container.h +++ b/src/core/file_sys/ncch_container.h @@ -253,9 +253,9 @@ public: * Attempts to patch a buffer using an IPS * @param ips Vector of the patches to apply * @param buffer Vector to patch data into - * @return ResultStatus result of function + * @return Void */ - Loader::ResultStatus ApplyIPS(std::vector& ips, std::vector& buffer); + void ApplyIPS(std::vector& ips, std::vector& buffer); /** * Get the override RomFS of the NCCH container