From a43db4ab229df5934b7275c4560037a6c017064a Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 27 Mar 2017 20:32:07 +0200 Subject: [PATCH] express: More robust parsing fix (nw) --- src/emu/debug/express.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp index 951a1899869..198b9428837 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 with_se = string[0] == '!'; - string += 1; - return parse_memory_operator(token, buffer.c_str(), with_se); + try { + bool with_se = string[0] == '!'; + parse_memory_operator(token, buffer.c_str(), with_se); + string += 1; + return; + } catch(const expression_error &e) { + // Try some other operator instead + } } // empty string is automatically invalid