diff options
author | 2016-02-21 11:48:45 +0100 | |
---|---|---|
committer | 2016-02-21 11:48:45 +0100 | |
commit | cc24a339d8c0517259084b5c178d784626ba965c (patch) | |
tree | 9868e9687b5802ae0a3733712a3bbeb3bc75c953 /src/emu/debug/debugcmd.cpp | |
parent | b5daabda5495dea5c50e17961ecfed2ea8619d76 (diff) |
Merge remote-tracking branch 'refs/remotes/mamedev/master'
Second attempt
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r-- | src/emu/debug/debugcmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |