From: Antony Dovgal Date: Wed, 14 Apr 2010 15:49:38 +0000 (+0000) Subject: discard first TWO symbols of a long argument X-Git-Tag: php-5.3.3RC1~316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2404c4c84f431ec5b1106faa99056533739c3854;p=php discard first TWO symbols of a long argument --- 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') {