Skip to content

Commit

Permalink
[BUGFIX] Fixed invalid debug string causing a SegFault
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Sep 7, 2021
1 parent d763c62 commit b8752e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions paramkit/include/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ namespace paramkit {
// has argument:
const bool hasArg = (i + 1) < argc && !(isParam(to_string(argv[i + 1])));
if (hasArg) {
std::string nextVal = to_string(argv[i + 1]);
const std::string nextVal = to_string(argv[i + 1]);
i++; // icrement index: move to the next argument
found = true;
//help requested explicitly or parsing failed
Expand All @@ -280,9 +280,6 @@ namespace paramkit {
param->printDesc();
break;
}
#ifdef _DEBUG
std::cout << argv[i] << " : " << argv[i + 1] << "\n";
#endif
break;
}
// does not require an argument:
Expand Down

0 comments on commit b8752e3

Please sign in to comment.