summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2017-03-27 20:32:07 +0200
committer Olivier Galibert <galibert@pobox.com>2017-03-27 20:33:02 +0200
commit365a639ce98b4b37dc7722fb82a04ebcb43a6470 (patch)
tree04453aafd5a22d2e31cc9939810f4ba4f2c755e2 /src/emu
parent015cb391cec644a295730db08ba1c95901af98c5 (diff)
express: More robust parsing fix (nw)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/debug/express.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp
index 7e8934f682b..21fd978591e 100644
--- a/src/emu/debug/express.cpp
+++ b/src/emu/debug/express.cpp
@@ -873,12 +873,17 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
string++;
}
- // check for memory @ operators
- if ((string[0] == '@' || string[0] == '!') && (buffer.back() == 'b' || buffer.back() == 'w' || buffer.back() == 'd' || buffer.back() == 'q'))
+ // check for memory @ and ! operators
+ if (string[0] == '@' || string[0] == '!')
{
- bool disable_se = string[0] == '@';
- string += 1;
- return parse_memory_operator(token, buffer.c_str(), disable_se);
+ try {
+ bool disable_se = string[0] == '@';
+ parse_memory_operator(token, buffer.c_str(), disable_se);
+ string += 1;
+ return;
+ } catch(const expression_error &e) {
+ // Try some other operator instead
+ }
}
// empty string is automatically invalid