Fix installing bogus wads

This commit is contained in:
Juan de la Cruz Caravaca Guerrero 2024-07-13 16:48:31 +02:00
parent d9ba968f90
commit ed2c3b83d7
2 changed files with 59 additions and 58 deletions

View File

@ -239,7 +239,6 @@ s32 Sys_GetSharedContents(SharedContent** out, u32* count)
{
if (!out || !count) return false;
int ret = 0;
u32 size;
SharedContent* buf = (SharedContent*)NANDLoadFile("/shared1/content.map", &size);
@ -276,7 +275,6 @@ bool Sys_SharedContentPresent(tmd_content* content, SharedContent shared[], u32
bool Sys_GetcIOSInfo(int IOS, cIOSInfo* out)
{
int ret;
u64 titleID = 0x0000000100000000ULL | IOS;
ATTRIBUTE_ALIGN(0x20) char path[ISFS_MAXPATH];
u32 size;

View File

@ -965,6 +965,8 @@ skipChecks:
if (ret < 0)
goto err;
if (header->data_len) // Bogus WADs have no contents
{
/* Get list of currently installed shared contents */
Sys_GetSharedContents(&sharedContents, &sharedContentsCount);
@ -1033,6 +1035,7 @@ skipChecks:
if (ret < 0)
goto err;
}
}
Con_ClearLine();