From b7175f7f5c83783cc139814bdb786bf09e9c369a Mon Sep 17 00:00:00 2001 From: jakcron Date: Tue, 26 Jun 2018 21:13:28 +0800 Subject: [PATCH] [nx] Typos --- lib/libnx/source/NcaHeader.cpp | 8 ++++---- lib/libnx/source/NcaUtils.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libnx/source/NcaHeader.cpp b/lib/libnx/source/NcaHeader.cpp index caeafca..d41437e 100644 --- a/lib/libnx/source/NcaHeader.cpp +++ b/lib/libnx/source/NcaHeader.cpp @@ -60,10 +60,10 @@ void nx::NcaHeader::toBytes() switch(mFormatVersion) { case (NCA2_FORMAT): - hdr->st_magic = nca::kNca2StMagic; + hdr->st_magic = nca::kNca2StructMagic; break; case (NCA3_FORMAT): - hdr->st_magic = nca::kNca3StMagic; + hdr->st_magic = nca::kNca3StructMagic; break; default: throw fnd::Exception(kModuleName, "Unsupported format version"); @@ -124,10 +124,10 @@ void nx::NcaHeader::fromBytes(const byte_t * data, size_t len) switch(hdr->st_magic.get()) { - case (nca::kNca2StMagic) : + case (nca::kNca2StructMagic) : mFormatVersion = NCA2_FORMAT; break; - case (nca::kNca3StMagic) : + case (nca::kNca3StructMagic) : mFormatVersion = NCA3_FORMAT; break; throw fnd::Exception(kModuleName, "NCA header corrupt"); diff --git a/lib/libnx/source/NcaUtils.cpp b/lib/libnx/source/NcaUtils.cpp index 70821c3..5ec75c2 100644 --- a/lib/libnx/source/NcaUtils.cpp +++ b/lib/libnx/source/NcaUtils.cpp @@ -9,7 +9,7 @@ void nx::NcaUtils::decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto crypto::aes::AesXtsMakeTweak(tweak, 1); crypto::aes::AesXtsDecryptSector(src + sectorToOffset(1), nx::nca::kSectorSize, key.key[0], key.key[1], tweak, raw_hdr); - bool useNca2SectorIndex = ((nx::sNcaHeader*)(raw_hdr))->st_magic.get() == nx::nca::kNca2StMagic; + bool useNca2SectorIndex = ((nx::sNcaHeader*)(raw_hdr))->st_magic.get() == nx::nca::kNca2StructMagic; // decrypt whole header for (size_t i = 0; i < nx::nca::kHeaderSectorNum; i++)