mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
dom/test: properly test test option matches in get_test_opt
This commit is contained in:
parent
2d03a7d74f
commit
fa1108760a
@ -256,11 +256,15 @@ get_test_opt(char **argref, const char *name, int *argi, int argc, char *argv[],
|
||||
arg += namelen;
|
||||
if (*arg == '=') {
|
||||
(*argref) = arg + 1;
|
||||
} else {
|
||||
|
||||
} else if (!*arg) {
|
||||
(*argi)++;
|
||||
if ((*argi) >= argc)
|
||||
die("--%s expects %s", name, expect_msg);
|
||||
(*argref) = argv[(*argi)];
|
||||
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user