mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 10:45:28 +00:00
Skip bad title.keys rows instead of throwing an exception.
This commit is contained in:
parent
811334bae5
commit
85dd51f496
|
@ -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