1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00

dom/test: properly test test option matches in get_test_opt

This commit is contained in:
Jonas Fonseca 2007-08-28 20:22:22 +02:00
parent 5d88ea78f9
commit c6a223c8dd

View File

@ -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;