Skip to content

Commit

Permalink
Fix error check in debugger print cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
gvoskuilen committed Oct 10, 2024
1 parent 7415529 commit a7012bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sst/core/impl/interactive/simpleDebug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ SimpleDebugger::cmd_print(std::vector<std::string>& 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] [<obj>])\n");
return;
}

// See if have a -r or not
int recurse = 0;
std::string tok = tokens[1];
Expand Down

0 comments on commit a7012bf

Please sign in to comment.