diff options
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r-- | src/emu/debug/debugcmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index ff29281ab64..781ce93e9a5 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -1382,12 +1382,18 @@ void debugger_commands::execute_go_branch(bool sense, const std::vector<std::str void debugger_commands::execute_go_next_instruction(const std::vector<std::string> ¶ms) { u64 count = 1; + static constexpr u64 MAX_COUNT = 512; // if we have a parameter, use it instead */ if (params.size() > 0 && !validate_number_parameter(params[0], count)) return; if (count == 0) return; + if (count > MAX_COUNT) + { + m_console.printf("Too many instructions (must be %d or fewer)\n", MAX_COUNT); + return; + } device_state_interface *stateintf; device_t *cpu = m_machine.debugger().console().get_visible_cpu(); |