fix failure of strrchr(str, 0)

bug report and solution by Richard Pennington
This commit is contained in:
Rich Felker 2012-05-26 18:01:34 -04:00
parent 3f25354e62
commit aefd0f69bd
1 changed files with 1 additions and 1 deletions

View File

@ -4,5 +4,5 @@ void *__memrchr(const void *, int, size_t);
char *strrchr(const char *s, int c)
{
return __memrchr(s, c, strlen(s));
return __memrchr(s, c, strlen(s) + 1);
}