From 5c575847a6114c97279a214971b10b83229769d6 Mon Sep 17 00:00:00 2001 From: Pengfei Date: Sat, 7 Aug 2021 10:49:14 +0800 Subject: [PATCH] Fix for CIA meta Only titles with SMDH should have a meta --- src/core/cia_builder.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/cia_builder.cpp b/src/core/cia_builder.cpp index 298c893..28f4c14 100644 --- a/src/core/cia_builder.cpp +++ b/src/core/cia_builder.cpp @@ -339,8 +339,6 @@ bool CIABuilder::AddContent(u16 content_id, NCCHContainer& ncch) { } // Load meta if the content is main - header.meta_size = sizeof(meta); - static_assert(sizeof(ncch.exheader_header.dependency_list) == sizeof(meta.dependencies), "Dependency list should be of the same size in NCCH and CIA"); std::memcpy(meta.dependencies.data(), &ncch.exheader_header.dependency_list, @@ -356,7 +354,7 @@ bool CIABuilder::AddContent(u16 content_id, NCCHContainer& ncch) { } std::memcpy(meta.icon_data.data(), smdh_buffer.data(), std::min(meta.icon_data.size(), smdh_buffer.size())); - + header.meta_size = sizeof(meta); return true; }