From b6a451442eb0efb628fadfcce3fd91d638fead65 Mon Sep 17 00:00:00 2001 From: jakcron Date: Mon, 10 Sep 2018 16:52:23 +0800 Subject: [PATCH] [nstool|hac] Fix typo in cnmt AocExtendedHeader field. --- lib/libhac/include/nn/hac/ContentMetaBinary.h | 6 +++--- lib/libhac/include/nn/hac/cnmt.h | 2 +- lib/libhac/source/ContentMetaBinary.cpp | 2 +- programs/nstool/source/CnmtProcess.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libhac/include/nn/hac/ContentMetaBinary.h b/lib/libhac/include/nn/hac/ContentMetaBinary.h index 84f5d9c..8c57644 100644 --- a/lib/libhac/include/nn/hac/ContentMetaBinary.h +++ b/lib/libhac/include/nn/hac/ContentMetaBinary.h @@ -120,18 +120,18 @@ namespace hac struct AddOnContentMetaExtendedHeader { uint64_t application_id; - uint32_t required_system_version; + uint32_t required_application_version; void operator=(const AddOnContentMetaExtendedHeader& other) { application_id = other.application_id; - required_system_version = other.required_system_version; + required_application_version = other.required_application_version; } bool operator==(const AddOnContentMetaExtendedHeader& other) const { return (application_id == other.application_id) \ - && (required_system_version == other.required_system_version); + && (required_application_version == other.required_application_version); } bool operator!=(const AddOnContentMetaExtendedHeader& other) const diff --git a/lib/libhac/include/nn/hac/cnmt.h b/lib/libhac/include/nn/hac/cnmt.h index f7c8eb3..81871c0 100644 --- a/lib/libhac/include/nn/hac/cnmt.h +++ b/lib/libhac/include/nn/hac/cnmt.h @@ -118,7 +118,7 @@ namespace hac struct sAddOnContentMetaExtendedHeader { le_uint64_t application_id; - le_uint32_t required_system_version; + le_uint32_t required_application_version; byte_t reserved[4]; }; diff --git a/lib/libhac/source/ContentMetaBinary.cpp b/lib/libhac/source/ContentMetaBinary.cpp index 22c5ab7..7ebd628 100644 --- a/lib/libhac/source/ContentMetaBinary.cpp +++ b/lib/libhac/source/ContentMetaBinary.cpp @@ -100,7 +100,7 @@ void nn::hac::ContentMetaBinary::fromBytes(const byte_t* data, size_t len) break; case (cnmt::METATYPE_ADD_ON_CONTENT): mAddOnContentMetaExtendedHeader.application_id = ((sAddOnContentMetaExtendedHeader*)mExtendedHeader.data())->application_id.get(); - mAddOnContentMetaExtendedHeader.required_system_version = ((sAddOnContentMetaExtendedHeader*)mExtendedHeader.data())->required_system_version.get(); + mAddOnContentMetaExtendedHeader.required_application_version = ((sAddOnContentMetaExtendedHeader*)mExtendedHeader.data())->required_application_version.get(); break; case (cnmt::METATYPE_DELTA): mDeltaMetaExtendedHeader.application_id = ((sDeltaMetaExtendedHeader*)mExtendedHeader.data())->application_id.get(); diff --git a/programs/nstool/source/CnmtProcess.cpp b/programs/nstool/source/CnmtProcess.cpp index f40caab..29caeb4 100644 --- a/programs/nstool/source/CnmtProcess.cpp +++ b/programs/nstool/source/CnmtProcess.cpp @@ -90,7 +90,7 @@ void CnmtProcess::displayCnmt() break; case (nn::hac::cnmt::METATYPE_ADD_ON_CONTENT): std::cout << " AddOnContentMetaExtendedHeader:" << std::endl; - std::cout << " RequiredSystemVersion: v" << std::dec << mCnmt.getAddOnContentMetaExtendedHeader().required_system_version << " (" << _SPLIT_VER(mCnmt.getAddOnContentMetaExtendedHeader().required_system_version) << ")"<< std::endl; + std::cout << " RequiredApplicationVersion: v" << std::dec << mCnmt.getAddOnContentMetaExtendedHeader().required_application_version << " (" << _SPLIT_VER(mCnmt.getAddOnContentMetaExtendedHeader().required_application_version) << ")" << std::endl; std::cout << " ApplicationId: 0x" << std::hex << std::setw(16) << std::setfill('0') << mCnmt.getAddOnContentMetaExtendedHeader().application_id << std::endl; break; case (nn::hac::cnmt::METATYPE_DELTA):