Fix the case where match_word() matches the last word on the line. It
would previously return 0 because it expected the next character after the matched word to be a space. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@474 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
ebccc4d687
commit
f229d69d05
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ match_word(const char *str, const char *word)
|
||||||
|
|
||||||
while (*str && tolower(*str) == tolower(*word))
|
while (*str && tolower(*str) == tolower(*word))
|
||||||
++str, ++word;
|
++str, ++word;
|
||||||
return (*str == ' ' && *word == '\0');
|
return ((*str == ' ' || *str == '\0') && *word == '\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue