Don't try to parse single -- as IP address
This commit is contained in:
@@ -74,9 +74,11 @@ int main( int argc, char *argv[] )
|
||||
char **command = NULL;
|
||||
|
||||
/* Look for command */
|
||||
for ( int i = 0; i < argc - 1; i++ ) {
|
||||
for ( int i = 0; i < argc; i++ ) {
|
||||
if ( 0 == strcmp( argv[ i ], "--" ) ) { /* start of command */
|
||||
if ( i != argc - 1 ) {
|
||||
command = argv + i + 1;
|
||||
}
|
||||
argc = i; /* rest of options before -- */
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user