fix infinite loop while parsing command line options

This commit is contained in:
Sergey Popov 2012-03-22 18:37:20 +04:00
parent a2877a1364
commit bc7929b67b

View File

@ -385,7 +385,7 @@ void arg_parse(int argc, char *argv[])
{
{"init", no_argument, NULL, 'i'},
};
while ((c = getopt_long(argc, argv,"i", option_string, NULL)) != 0)
while ((c = getopt_long(argc, argv,"i", option_string, NULL)) != -1)
{
switch(c)
{