Don't try to parse single -- as IP address

This commit is contained in:
Keith Winstein
2012-03-18 02:38:45 -04:00
parent 452ff9f992
commit cf017cd99c
+4 -2
View File
@@ -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 */
command = argv + i + 1;
if ( i != argc - 1 ) {
command = argv + i + 1;
}
argc = i; /* rest of options before -- */
break;
}