summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r--src/emu/machine.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index f17f6c47d49..510b763b523 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -534,21 +534,10 @@ std::string running_machine::get_statename(const char *option) const
int name_found = 0;
// find length of the device name
- int end1 = statename_str.find('/', pos + 3);
- int end2 = statename_str.find('%', pos + 3);
- int end;
-
- if ((end1 != -1) && (end2 != -1))
- end = std::min(end1, end2);
- else if (end1 != -1)
- end = end1;
- else if (end2 != -1)
- end = end2;
- else
+ int end = statename_str.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890", pos + 3);
+ if (end == -1)
end = statename_str.length();
- if (end - pos < 3)
- fatalerror("Something very wrong is going on!!!\n");
// copy the device name to an std::string
std::string devname_str;