Fix ES_EALIGN when deleting ticket(s?) (#1)

This commit is contained in:
thepikachugamer 2024-03-01 10:08:02 -05:00 committed by GitHub
parent 5283493c4e
commit 18f2e3f07f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1259,16 +1259,18 @@ s32 Wad_Uninstall(FILE *fp)
/* Delete tickets */ /* Delete tickets */
if (ret >= 0) { if (ret >= 0) {
u32 cnt; u32 cnt;
tikview view ATTRIBUTE_ALIGN(0x20) = {};
/* Delete all tickets */ /* Delete all tickets */
for (cnt = 0; cnt < viewCnt; cnt++) { for (cnt = 0; cnt < viewCnt; cnt++) {
ret = ES_DeleteTicket(&viewData[cnt]); memcpy(&view, viewData + cnt, sizeof(tikview));
ret = ES_DeleteTicket(&view);
if (ret < 0) if (ret < 0)
break; break;
} }
if (ret < 0) if (ret < 0)
printf(" ERROR! (ret = %d\n", ret); printf(" ERROR! (ret = %d)\n", ret);
else else
printf(" OK!\n"); printf(" OK!\n");
} }