diff options
author | Nebuleon Fumika | 2013-06-10 22:23:34 -0400 |
---|---|---|
committer | Nebuleon Fumika | 2013-06-10 22:23:34 -0400 |
commit | 4252250fe77d6bd874ed626314a819340c29b4db (patch) | |
tree | 325f0969e6ec52481b2d1fb0ee0f2be64a29a166 | |
parent | 5e5d5dcaa10ab0f27b7fb9733a4701a849b22f00 (diff) | |
download | snesemu-4252250fe77d6bd874ed626314a819340c29b4db.tar.gz snesemu-4252250fe77d6bd874ed626314a819340c29b4db.tar.bz2 snesemu-4252250fe77d6bd874ed626314a819340c29b4db.zip |
Prevent a file handle leak when previewing saved states in the row of Load cells.
-rw-r--r-- | source/nds/gui.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c index fd20035..c75564f 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -2293,24 +2293,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation) { get_savestate_filename(savestate_index, tmp_filename); sprintf(line_buffer, "%s/%s", DEFAULT_RTS_DIR, tmp_filename); - fp= fopen(line_buffer, "r"); - //file error - if(fp == NULL) - { - draw_message(down_screen_addr, bg_screenp, 28, 31, 227, 165, bg_screenp_color); - draw_string_vcenter(down_screen_addr, MESSAGE_BOX_TEXT_X, MESSAGE_BOX_TEXT_Y, MESSAGE_BOX_TEXT_SX, COLOR_MSSG, msg[MSG_PROGRESS_SAVED_STATE_CORRUPTED]); - ds2_flipScreen(DOWN_SCREEN, DOWN_SCREEN_UPDATE_METHOD); - - wait_Allkey_release(0); - if(gui_action == CURSOR_SELECT) - wait_Anykey_press(0); - else - mdelay(1000); - return; - } - - fclose(fp); //right if(gui_action == CURSOR_SELECT) { |