[libromdata] WiiTicket::isRomSupported_static(): Allow larger tickets for vWii titles.

NUS vWii titles may have a certificate chain appended to the ticket.
This commit is contained in:
David Korth 2025-05-03 19:01:26 -04:00
parent 85e9ca4fad
commit cbbe2e1a3d

View File

@ -328,12 +328,15 @@ int WiiTicket::isRomSupported_static(const DetectInfo *info)
default: default:
// Unsupported ticket version. // Unsupported ticket version.
return -1; return -1;
case 0: case 0:
if (info->szFile != sizeof(RVL_Ticket)) { // NOTE: vWii titles may have a certificate chain appended to the ticket.
if (info->szFile < static_cast<off64_t>(sizeof(RVL_Ticket))) {
// Incorrect file size. // Incorrect file size.
return -1; return -1;
} }
break; break;
case 1: case 1:
if (info->szFile < static_cast<off64_t>(sizeof(RVL_Ticket_V1))) { if (info->szFile < static_cast<off64_t>(sizeof(RVL_Ticket_V1))) {
// Incorrect file size. // Incorrect file size.