summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/swlist.cpp
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-09-24 08:56:00 -0400
committer Nathan Woods <npwoods@mess.org>2016-09-24 08:56:00 -0400
commite8f19ee9e811e10cb0ece76b7c763ccd882f3685 (patch)
treede98bfb9c72d465c48d34ad1c06cddf11b467b55 /src/frontend/mame/ui/swlist.cpp
parent29b70720430b958d0b3a5aae734c9e96823c40c9 (diff)
Fixed an off by one error when identifying best entries for typeahead on the file selection and software list dialogs
Diffstat (limited to 'src/frontend/mame/ui/swlist.cpp')
-rw-r--r--src/frontend/mame/ui/swlist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/mame/ui/swlist.cpp b/src/frontend/mame/ui/swlist.cpp
index 7fbd453217e..df7bc42e2c1 100644
--- a/src/frontend/mame/ui/swlist.cpp
+++ b/src/frontend/mame/ui/swlist.cpp
@@ -280,7 +280,7 @@ void menu_software_list::handle()
auto &compare_name = m_ordered_by_shortname ? entry.short_name : entry.long_name;
int match = 0;
- for (int i = 0; i < m_filename_buffer.length(); i++)
+ for (int i = 0; i < m_filename_buffer.size() + 1; i++)
{
if (core_strnicmp(compare_name.c_str(), m_filename_buffer.c_str(), i) == 0)
match = i;