Fixed XCI Header Hey selection.

This commit is contained in:
Jack 2022-07-07 20:41:05 +08:00
parent 87459b6f8d
commit 390b544059
2 changed files with 2 additions and 2 deletions

2
deps/libpietendo vendored

@ -1 +1 @@
Subproject commit 3c68ffeeb903d286647823ea1676d1cb7ede939b
Subproject commit 89204ee499bfb3e4d1017c4a1fe2d29b2e70ff37

View file

@ -120,7 +120,7 @@ void nstool::GameCardProcess::importHeader()
memcpy(mHdrSignature.data(), hdr_ptr->signature.data(), mHdrSignature.size());
// decrypt extended header
byte_t xci_header_key_index = hdr_ptr->header.key_flag & 7;
byte_t xci_header_key_index = hdr_ptr->header.key_flag & 0xf;
if (mKeyCfg.xci_header_key.find(xci_header_key_index) != mKeyCfg.xci_header_key.end())
{
pie::hac::GameCardUtil::decryptXciHeader(&hdr_ptr->header, mKeyCfg.xci_header_key[xci_header_key_index].data());