From 629af025f1890a0e5ff7f01d0241f336d3f0964d Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Tue, 5 Apr 2011 17:48:34 +0000 Subject: [PATCH] uiimage.c: added reset of the char input buffer when selecting an entry in the file manager (it's mainly for MESS --> no whatsnew) --- src/emu/uiimage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/uiimage.c b/src/emu/uiimage.c index 4bd6359c8fe..ef4081f382f 100644 --- a/src/emu/uiimage.c +++ b/src/emu/uiimage.c @@ -844,6 +844,10 @@ static void menu_file_selector(running_machine &machine, ui_menu *menu, void *pa ui_menu_stack_pop(machine); break; } + + // reset the char buffer when pressing IPT_UI_SELECT + if (menustate->filename_buffer[0] != '\0') + memset(menustate->filename_buffer, '\0', ARRAY_LENGTH(menustate->filename_buffer)); } else if (event->iptkey == IPT_SPECIAL) {