diff options
author | Antony Dovgal <tony2001@php.net> | 2010-04-14 15:49:38 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2010-04-14 15:49:38 +0000 |
commit | 29aff0a5955add350d2312dd8609c730b8470111 (patch) | |
tree | 070b44c64825b30a321e7a0fefced333627f7b8d /main/getopt.c | |
parent | 623818f41632fb5fca2fc52a854e00e0b81d9e6f (diff) | |
download | php-git-29aff0a5955add350d2312dd8609c730b8470111.tar.gz |
discard first TWO symbols of a long argument
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') { |