1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 04:02:11 +00:00

Fix silly bug in titleGetNcmContentMetaTypeName.

This commit is contained in:
Pablo Curiel 2020-10-04 06:40:56 -04:00
parent afa99ba445
commit 7573c53457
2 changed files with 12 additions and 2 deletions

View file

@ -206,6 +206,16 @@ int main(int argc, char *argv[])
FILE *xml_fd = NULL;
char path[FS_MAX_PATH] = {0};
sprintf(path, "sdmc:/%s.nacp", nca_ctx->content_id_str);
xml_fd = fopen(path, "wb");
if (xml_fd)
{
fwrite(nacp_ctx.data, 1, sizeof(_NacpStruct), xml_fd);
fclose(xml_fd);
xml_fd = NULL;
}
sprintf(path, "sdmc:/%s.nacp.xml", nca_ctx->content_id_str);
xml_fd = fopen(path, "wb");

View file

@ -866,8 +866,8 @@ const char *titleGetNcmContentTypeName(u8 content_type)
const char *titleGetNcmContentMetaTypeName(u8 content_meta_type)
{
return ((content_meta_type <= NcmContentMetaType_BootImagePackageSafe || (content_meta_type >= NcmContentMetaType_Application && content_meta_type <= NcmContentMetaType_Delta)) ? \
g_titleNcmContentMetaTypeNames[content_meta_type] : NULL);
if ((content_meta_type > NcmContentMetaType_BootImagePackageSafe && content_meta_type < NcmContentMetaType_Application) || content_meta_type > NcmContentMetaType_Delta) return NULL;
return (content_meta_type <= NcmContentMetaType_BootImagePackageSafe ? g_titleNcmContentMetaTypeNames[content_meta_type] : g_titleNcmContentMetaTypeNames[content_meta_type - 0x7A]);
}
NX_INLINE void titleFreeApplicationMetadata(void)