From 18f2e3f07fc7c2228a910a31a9899d9e0e566f3f Mon Sep 17 00:00:00 2001 From: thepikachugamer <44107089+Naim2000@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:08:02 -0500 Subject: [PATCH] Fix ES_EALIGN when deleting ticket(s?) (#1) --- source/wad.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/wad.c b/source/wad.c index c3651af..bfa10b1 100644 --- a/source/wad.c +++ b/source/wad.c @@ -1259,16 +1259,18 @@ s32 Wad_Uninstall(FILE *fp) /* Delete tickets */ if (ret >= 0) { u32 cnt; + tikview view ATTRIBUTE_ALIGN(0x20) = {}; /* Delete all tickets */ for (cnt = 0; cnt < viewCnt; cnt++) { - ret = ES_DeleteTicket(&viewData[cnt]); + memcpy(&view, viewData + cnt, sizeof(tikview)); + ret = ES_DeleteTicket(&view); if (ret < 0) break; } if (ret < 0) - printf(" ERROR! (ret = %d\n", ret); + printf(" ERROR! (ret = %d)\n", ret); else printf(" OK!\n"); }