Skip to content

Commit 29aff0a

Browse files
committed
discard first TWO symbols of a long argument
1 parent 623818f commit 29aff0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/getopt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char
8181
}
8282
if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) {
8383
char *pos;
84-
int arg_end = strlen(argv[*optind])-1;
84+
int arg_end = strlen(argv[*optind])-2;
8585

8686
/* '--' indicates end of args if not followed by a known long option name */
8787
if (argv[*optind][2] == '\0') {

0 commit comments

Comments
 (0)