debugger: Memory accesses in expressions don't support taking the first exposed space (yet).

This commit is contained in:
Vas Crabb 2021-10-20 02:59:52 +11:00
parent fe06ea9b42
commit 2327c5e785

View File

@ -585,11 +585,11 @@ expression_error symbol_table::expression_get_space(const char *tag, int &spacen
return expression_error::NO_SUCH_MEMORY_SPACE;
}
// allow short references to data, I/O and opcode spaces
if (spacename.empty() && spacenum != 0)
// search not required
if (spacename.empty() && (0 <= spacenum))
return expression_error::NONE;
// find space by name or take first populated space
// find space by name or take first populated space if required
for (int i = 0; memory->max_space_count() > i; ++i)
{
if (memory->has_space(i) && (spacename.empty() || (memory->space(i).name() == spacename)))