diff --git a/man/mosh-server.1 b/man/mosh-server.1 index 79f8fb1..071859d 100644 --- a/man/mosh-server.1 +++ b/man/mosh-server.1 @@ -21,7 +21,7 @@ mosh-server \- server-side helper for mosh .B mosh-server [IP address to bind] [port number to bind] -[-- command command2 ...] +[-- command...] .br .SH DESCRIPTION \fBmosh-server\fP is a helper program for the diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index d8a936a..ac428f3 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -74,7 +74,7 @@ int main( int argc, char *argv[] ) char **command = NULL; /* Look for command */ - for ( int i = 0; i < argc; i++ ) { + for ( int i = 0; i < argc - 1; i++ ) { if ( 0 == strcmp( argv[ i ], "--" ) ) { /* start of command */ command = argv + i + 1; argc = i; /* rest of options before -- */