Skip to content

Commit

Permalink
Undefined behavior fix on ticket.c (#838)
Browse files Browse the repository at this point in the history
Stack garbage is always a luck of the draw
This was causing issues on non-LTO build.
LTO was just lucky.
  • Loading branch information
luigoalma authored Jan 25, 2024
1 parent ad8b5e0 commit 399740b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arm9/source/game/ticket.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ u32 BuildVariableFakeTicket(Ticket** ticket, u32* ticket_size, const u8* title_i
}

u32 BuildFakeTicket(Ticket* ticket, const u8* title_id) {
Ticket* tik;
Ticket* tik = NULL;
u32 ticket_size = sizeof(TicketCommon);
u32 res = BuildVariableFakeTicket(&tik, &ticket_size, title_id, TICKET_MAX_CONTENTS);
if (res != 0) return res;
Expand Down

0 comments on commit 399740b

Please sign in to comment.