[ARDrone] Fix parsing of option -l
This commit is contained in:
parent
fe8846cca9
commit
c079ee14ca
|
@ -494,11 +494,6 @@ void parse_main_options(int argc, char **argv)
|
|||
options.listening_port = strtoul(optarg, NULL, 0) ;
|
||||
else // We got -l alone or -l <port>
|
||||
{
|
||||
/* If we are at the end of the string, or the next optind
|
||||
* is an option, we have -l without a port number */
|
||||
optind++ ;
|
||||
}
|
||||
|
||||
/* If we are at the end of the string, or the next optind
|
||||
* is an option, we have -l without a port number */
|
||||
if (argv[optind] == NULL || argv[optind][0] == '-')
|
||||
|
@ -511,7 +506,8 @@ void parse_main_options(int argc, char **argv)
|
|||
strtoul(argv[optind], NULL, 0) ;
|
||||
optind++ ;
|
||||
}
|
||||
break ;
|
||||
}
|
||||
break ;
|
||||
case 'n' :
|
||||
options.nb_pkt = strtoul(optarg, NULL, 0) ;
|
||||
break ;
|
||||
|
|
Loading…
Reference in New Issue