From cc24a339d8c0517259084b5c178d784626ba965c Mon Sep 17 00:00:00 2001 From: ImJezze Date: Sun, 21 Feb 2016 11:48:45 +0100 Subject: Merge remote-tracking branch 'refs/remotes/mamedev/master' Second attempt --- src/emu/debug/debugcmd.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/emu/debug/debugcmd.cpp') diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index 4558413b2c3..7ad039806ea 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -2381,11 +2381,12 @@ static void execute_find(running_machine &machine, int ref, int params, const ch for (int i = 2; i < params; i++) { const char *pdata = param[i]; + size_t pdatalen = strlen(pdata) - 1; /* check for a string */ - if (pdata[0] == '"' && pdata[strlen(pdata) - 1] == '"') + if (pdata[0] == '"' && pdata[pdatalen] == '"') { - for (j = 1; j < strlen(pdata) - 1; j++) + for (j = 1; j < pdatalen; j++) { data_to_find[data_count] = pdata[j]; data_size[data_count++] = 1; -- cgit v1.2.3-70-g09d2