From a7012bf1b950da584e1e1ea0c78159d2cb961d03 Mon Sep 17 00:00:00 2001 From: Gwen Date: Thu, 10 Oct 2024 13:26:24 -0600 Subject: [PATCH] Fix error check in debugger print cmd --- src/sst/core/impl/interactive/simpleDebug.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sst/core/impl/interactive/simpleDebug.cc b/src/sst/core/impl/interactive/simpleDebug.cc index 277633fd0..94ea0745a 100644 --- a/src/sst/core/impl/interactive/simpleDebug.cc +++ b/src/sst/core/impl/interactive/simpleDebug.cc @@ -130,6 +130,11 @@ SimpleDebugger::cmd_print(std::vector& tokens) // Index in tokens array where we may find the variable name size_t var_index = 1; + if (tokens.size() < 2) { + printf("Invalid format for print command (print [-rN] [])\n"); + return; + } + // See if have a -r or not int recurse = 0; std::string tok = tokens[1];