summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-02-04 20:18:31 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-02-04 20:18:31 +0000
commit64dbe52ef53802443c5b459524d63d019fdc7aee (patch)
tree181dc94331b857550ddb12bda9ef5902eafe2a12
parent23d7f9e1fa4cd45d7da4f5952ab66b1bfcd8fb42 (diff)
Fixed device search in the debugger to work like a normal
device search.
-rw-r--r--src/emu/debug/debugcpu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index e87eaec0c02..fadc3a086da 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -1147,12 +1147,10 @@ static void process_source_file(running_machine &machine)
static device_t *expression_get_device(running_machine &machine, const char *tag)
{
- device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
- if (mame_stricmp(device->tag(), tag) == 0)
- return device;
-
- return NULL;
+ // convert to lowercase then lookup the name (tags are enforced to be all lower case)
+ astring fullname(tag);
+ fullname.makelower();
+ return machine.device(fullname);
}