From ebdac5a54116d15838e61aa4e51fba7608cb7bf2 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 21 Sep 2026 19:04:28 +0000 Subject: [PATCH] Match GetValidTicketIndex --- src/utility/iplESMisc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utility/iplESMisc.cpp b/src/utility/iplESMisc.cpp index 1b4579f5..e3d5240b 100644 --- a/src/utility/iplESMisc.cpp +++ b/src/utility/iplESMisc.cpp @@ -279,10 +279,10 @@ namespace ipl { } ESError ESMisc::GetValidTicketIndex(EGG::Heap* heap, ESTitleId titleId, ESTicketView* ticket, u32 ticketLength) { + s32 index; bool allocated = false; bool found = false; ESTicketView* ticketView; - s32 index; if (ticket == NULL) { if (GetTicketViewList(heap, titleId, &ticket, &ticketLength) < 0) { @@ -318,8 +318,8 @@ namespace ipl { if (fd < 0) { OSReport("ESMisc::GetValidTicketIndex: ES_OpenTitleContentFile fd %d\n", fd); } else { - u8* buf = (u8*)heap->alloc(0x40, 32); - s32 numRead = ES_ReadContentFile(fd, buf, 0x40); + char* buf = (char*)heap->alloc(0x40, -32); + u32 numRead = ES_ReadContentFile(fd, buf, 0x40); if (numRead != 0x40) { OSReport("ESMisc::GetValidTicketIndex: ES_ReadContentFile err %d\n", numRead); -- 2.49.1