summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2010-04-14 15:49:38 (GMT)
committerAntony Dovgal <tony2001@php.net>2010-04-14 15:49:38 (GMT)
commit29aff0a5955add350d2312dd8609c730b8470111 (patch)
tree070b44c64825b30a321e7a0fefced333627f7b8d
parent623818f41632fb5fca2fc52a854e00e0b81d9e6f (diff)
downloadphp-29aff0a5955add350d2312dd8609c730b8470111.tar.gz
discard first TWO symbols of a long argument
-rw-r--r--main/getopt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/getopt.c b/main/getopt.c
index c40d460..25a4582 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') {