From 582b3a23ceeb9e894b0f1d43de09e97a91a4d3b9 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Wed, 16 Jan 2013 03:17:33 -0500 Subject: Initialise current_menu to NULL in menu(u16). Otherwise, choose_menu(&main_menu) tries to call the end_function of a menu that's a random pointer. --- source/nds/gui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/nds') diff --git a/source/nds/gui.c b/source/nds/gui.c index faaeeec..c3d5043 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -1665,9 +1665,9 @@ u32 menu(u16 *screen) // ^ Holds the index inside Cheat, as a number in an ASCIIZ string char* cheat_data_ptr[MAX_CHEATS_T]; - MENU_TYPE *current_menu; - MENU_OPTION_TYPE *current_option; - MENU_OPTION_TYPE *display_option; + MENU_TYPE *current_menu = NULL; + MENU_OPTION_TYPE *current_option = NULL; + MENU_OPTION_TYPE *display_option = NULL; u32 current_option_num; // u32 parent_option_num; -- cgit v1.2.3