Commit c03e1113 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(argmatch): Handle lstr == 0.

parent c4613e62
...@@ -375,7 +375,7 @@ argmatch (argv, sstr, lstr, minlen, valptr, skipptr) ...@@ -375,7 +375,7 @@ argmatch (argv, sstr, lstr, minlen, valptr, skipptr)
} }
arglen = (valptr != NULL && (p = index (arg, '=')) != NULL arglen = (valptr != NULL && (p = index (arg, '=')) != NULL
? p - arg : strlen (arg)); ? p - arg : strlen (arg));
if (arglen < minlen || strncmp (arg, lstr, arglen) != 0) if (lstr == 0 || arglen < minlen || strncmp (arg, lstr, arglen) != 0)
return 0; return 0;
else if (valptr == NULL) else if (valptr == NULL)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment