diff options
Diffstat (limited to 'main/getopt.c')
| -rw-r--r-- | main/getopt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/getopt.c b/main/getopt.c index c40d4607ac..25a4582e0a 100644 --- a/main/getopt.c +++ b/main/getopt.c @@ -81,7 +81,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char } if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) { char *pos; - int arg_end = strlen(argv[*optind])-1; + int arg_end = strlen(argv[*optind])-2; /* '--' indicates end of args if not followed by a known long option name */ if (argv[*optind][2] == '\0') { |
