From cd29ed80e645c7e0ac7ab6eb484b4ea095c0aa9e Mon Sep 17 00:00:00 2001 From: jakcron Date: Mon, 29 Oct 2018 19:11:48 +0800 Subject: [PATCH] [hac] Fix bug where stubbed kernel entries were not ignored. --- lib/libhac/include/nn/hac/KernelCapabilityEntry.h | 2 +- lib/libhac/source/KernelCapabilityControl.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libhac/include/nn/hac/KernelCapabilityEntry.h b/lib/libhac/include/nn/hac/KernelCapabilityEntry.h index 9da90ef..2df6ef3 100644 --- a/lib/libhac/include/nn/hac/KernelCapabilityEntry.h +++ b/lib/libhac/include/nn/hac/KernelCapabilityEntry.h @@ -48,7 +48,7 @@ namespace hac } if (id == kc::KC_INVALID && cap == (uint32_t)0xffffffff) - id == kc::KC_STUB; + id = kc::KC_STUB; return id; } diff --git a/lib/libhac/source/KernelCapabilityControl.cpp b/lib/libhac/source/KernelCapabilityControl.cpp index dc04074..b3f198f 100644 --- a/lib/libhac/source/KernelCapabilityControl.cpp +++ b/lib/libhac/source/KernelCapabilityControl.cpp @@ -117,6 +117,9 @@ void nn::hac::KernelCapabilityControl::fromBytes(const byte_t * data, size_t len case (kc::KC_MISC_FLAGS): miscFlagsCaps.addElement(cap); break; + case (kc::KC_STUB): + // ignore stubbed + break; default: throw fnd::Exception(kModuleName, "Unsupported kernel capability type"); }