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:
Dag-Erling Smørgrav 2011-11-03 10:56:10 +00:00
parent ebccc4d687
commit f229d69d05
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ match_word(const char *str, const char *word)
while (*str && tolower(*str) == tolower(*word))
++str, ++word;
return (*str == ' ' && *word == '\0');
return ((*str == ' ' || *str == '\0') && *word == '\0');
}
/*