mirror of
https://github.com/jakcron/nstool
synced 2024-11-14 17:56:39 +00:00
Skip bad title.keys rows instead of throwing an exception.
This commit is contained in:
parent
811334bae5
commit
85dd51f496
1 changed files with 4 additions and 2 deletions
|
@ -470,7 +470,8 @@ void nstool::KeyBagInitializer::importTitleKeyFile(const tc::io::Path& keyfile_p
|
|||
tmp = tc::cli::FormatUtil::hexStringToBytes(itr->first);
|
||||
if (tmp.size() != rights_id_tmp.size())
|
||||
{
|
||||
throw tc::ArgumentException("nstool::KeyBagInitializer", "RightsID: \"" + itr->first + "\" has incorrect length");
|
||||
fmt::print("[nstool::KeyBagInitializer WARNING] RightsID: \"{}\" has incorrect length. Skipping...\n", itr->first);
|
||||
continue;
|
||||
}
|
||||
memcpy(rights_id_tmp.data(), tmp.data(), rights_id_tmp.size());
|
||||
|
||||
|
@ -478,7 +479,8 @@ void nstool::KeyBagInitializer::importTitleKeyFile(const tc::io::Path& keyfile_p
|
|||
tmp = tc::cli::FormatUtil::hexStringToBytes(itr->second);
|
||||
if (tmp.size() != title_key_tmp.size())
|
||||
{
|
||||
throw tc::ArgumentException("nstool::KeyBagInitializer", "TitleKey for \""+ itr->first + "\": \"" + itr->second + "\" has incorrect length");
|
||||
fmt::print("[nstool::KeyBagInitializer WARNING] TitleKey for \"{}\": \"{}\" has incorrect length. Skipping...\n", itr->first, itr->second);
|
||||
continue;
|
||||
}
|
||||
memcpy(title_key_tmp.data(), tmp.data(), title_key_tmp.size());
|
||||
|
||||
|
|
Loading…
Reference in a new issue