Fix pkg_info(1) and pkg_delete(1) to handle properly packages which
names start with a digit. PR: bin/76858 Submitted by: Matthew D. Fuller <fullermd@over-yonder dot net> MFC after: 3 days
This commit is contained in:
parent
8272da3106
commit
b3f2825399
@ -121,7 +121,7 @@ main(int argc, char **argv)
|
||||
* package name. Otherwise we've come across a trailing '/' and
|
||||
* need to continue our quest.
|
||||
*/
|
||||
if (isalpha(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
|
||||
if (isalnum(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
|
||||
strpbrk(pkgs_split, "*?[]") != NULL)) {
|
||||
*argv = pkgs_split;
|
||||
break;
|
||||
|
@ -240,7 +240,7 @@ main(int argc, char **argv)
|
||||
* we've come across a trailing '/' and need to continue our
|
||||
* quest.
|
||||
*/
|
||||
if (isalpha(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
|
||||
if (isalnum(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
|
||||
strpbrk(pkgs_split, "*?[]") != NULL)) {
|
||||
*argv = pkgs_split;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user