(arg_match_long): make sure you only get an exact match if the strings
are the same length git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4972 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -270,14 +270,13 @@ arg_match_long(struct getargs *args, size_t num_args,
|
|||||||
negate = 0;
|
negate = 0;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (strncmp (args[i].long_name, p, len) == 0) {
|
if (strncmp (args[i].long_name, p, p_len) == 0) {
|
||||||
|
if(p_len == len)
|
||||||
current = &args[i];
|
current = &args[i];
|
||||||
optarg = p + len;
|
else {
|
||||||
} else if (strncmp (args[i].long_name,
|
|
||||||
p,
|
|
||||||
p_len) == 0) {
|
|
||||||
++partial_match;
|
++partial_match;
|
||||||
partial = &args[i];
|
partial = &args[i];
|
||||||
|
}
|
||||||
optarg = p + p_len;
|
optarg = p + p_len;
|
||||||
} else if (ISFLAG(args[i]) && strncmp (p, "no-", 3) == 0) {
|
} else if (ISFLAG(args[i]) && strncmp (p, "no-", 3) == 0) {
|
||||||
negate = !negate;
|
negate = !negate;
|
||||||
|
Reference in New Issue
Block a user