mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
fix long options
This commit is contained in:
parent
1607e9fa79
commit
83d74b7488
2 changed files with 4 additions and 2 deletions
|
@ -145,7 +145,8 @@ int php_getopt(int argc, char* const *argv, const opt_struct opts[], char **opta
|
|||
}
|
||||
return opts[opts_idx].opt_char;
|
||||
} else {
|
||||
if (arg_start >= 2) {
|
||||
/* multiple options specified as one (exclude long opts) */
|
||||
if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) {
|
||||
if (!argv[*optind][optchr+1])
|
||||
{
|
||||
dash = 0;
|
||||
|
|
|
@ -145,7 +145,8 @@ int php_getopt(int argc, char* const *argv, const opt_struct opts[], char **opta
|
|||
}
|
||||
return opts[opts_idx].opt_char;
|
||||
} else {
|
||||
if (arg_start >= 2) {
|
||||
/* multiple options specified as one (exclude long opts) */
|
||||
if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) {
|
||||
if (!argv[*optind][optchr+1])
|
||||
{
|
||||
dash = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue