diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-03 08:13:49 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-03 08:13:51 +0200 |
commit | 024eec02a59d5902e3731a7120ebc97846b34991 (patch) | |
tree | 6a16ff9f6b33deaca6a4a70226d5527cc3570b54 | |
parent | submission_package: Correct location of null check within SetTicketKeys() (diff) | |
download | yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar.gz yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar.bz2 yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar.lz yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar.xz yuzu-024eec02a59d5902e3731a7120ebc97846b34991.tar.zst yuzu-024eec02a59d5902e3731a7120ebc97846b34991.zip |
-rw-r--r-- | src/core/file_sys/submission_package.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/file_sys/submission_package.cpp b/src/core/file_sys/submission_package.cpp index 829aca06f..09bf077cd 100644 --- a/src/core/file_sys/submission_package.cpp +++ b/src/core/file_sys/submission_package.cpp @@ -38,8 +38,11 @@ void SetTicketKeys(const std::vector<VirtualFile>& files) { Core::Crypto::Key128 key{}; ticket_file->Read(key.data(), key.size(), Core::Crypto::TICKET_FILE_TITLEKEY_OFFSET); - std::string_view name_only(ticket_file->GetName()); - name_only.remove_suffix(4); + + // We get the name without the extension in order to create the rights ID. + std::string name_only(ticket_file->GetName()); + name_only.erase(name_only.size() - 4); + const auto rights_id_raw = Common::HexStringToArray<16>(name_only); u128 rights_id; std::memcpy(rights_id.data(), rights_id_raw.data(), sizeof(u128)); |