From 32a38d3f781551a7bb27f7f061ebeb1c680f3350 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Sat, 2 Jul 2016 09:36:13 -0400 Subject: [PATCH] Including the path separator when switching directories in the file selection UI --- src/frontend/mame/ui/filesel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp index deaef81c3d0..d3bb67aab28 100644 --- a/src/frontend/mame/ui/filesel.cpp +++ b/src/frontend/mame/ui/filesel.cpp @@ -340,7 +340,7 @@ void menu_file_selector::custom_render(void *selectedref, float top, float botto // we're hovering over a directory! highlight it auto target_dir_start = m_current_directory.rfind(PATH_SEPARATOR, hit_start) + 1; auto target_dir_end = m_current_directory.find(PATH_SEPARATOR, hit_start + hit_span); - m_hover_directory = m_current_directory.substr(0, target_dir_end); + m_hover_directory = m_current_directory.substr(0, target_dir_end + strlen(PATH_SEPARATOR)); // highlight the text in question rgb_t fgcolor = UI_MOUSEOVER_COLOR;