Merge pull request #8799 from liamwhite/where-did-the-padding-go

core/file_sys: fix alignment of BuildId
This commit is contained in:
liamwhite 2022-08-21 14:06:06 -04:00 committed by GitHub
commit 7fab7b829c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -217,7 +217,7 @@ void IPSwitchCompiler::Parse() {
break;
} else if (StartsWith(line, "@nsobid-")) {
// NSO Build ID Specifier
const auto raw_build_id = fmt::format("{:0>64}", line.substr(8));
const auto raw_build_id = fmt::format("{:0<64}", line.substr(8));
nso_build_id = Common::HexStringToArray<0x20>(raw_build_id);
} else if (StartsWith(line, "#")) {
// Mandatory Comment

View File

@ -191,7 +191,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const {
std::vector<VirtualFile> PatchManager::CollectPatches(const std::vector<VirtualDir>& patch_dirs,
const std::string& build_id) const {
const auto& disabled = Settings::values.disabled_addons[title_id];
const auto nso_build_id = fmt::format("{:0>64}", build_id);
const auto nso_build_id = fmt::format("{:0<64}", build_id);
std::vector<VirtualFile> out;
out.reserve(patch_dirs.size());
@ -206,7 +206,7 @@ std::vector<VirtualFile> PatchManager::CollectPatches(const std::vector<VirtualD
auto name = file->GetName();
const auto this_build_id =
fmt::format("{:0>64}", name.substr(0, name.find('.')));
fmt::format("{:0<64}", name.substr(0, name.find('.')));
if (nso_build_id == this_build_id)
out.push_back(file);
} else if (file->GetExtension() == "pchtxt") {