Skip to content

Commit

Permalink
Remove need for quotes around the command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Naylor committed Jan 10, 2019
1 parent 8aa2f00 commit caea127
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions RemoteCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ int main(int argc, char** argv)
unsigned int port = (unsigned int)::atoi(argv[1]);
std::string cmd = std::string(argv[2]);

for (int i = 3; i < argc; i++) {
cmd += " ";
cmd += std::string(argv[i]);
}

if (port == 0U) {
::fprintf(stderr, "RemoteCommand: invalid port number - %s\n", argv[1]);
return 1;
Expand Down

0 comments on commit caea127

Please sign in to comment.