fix failure of strrchr(str, 0)
bug report and solution by Richard Pennington
This commit is contained in:
parent
3f25354e62
commit
aefd0f69bd
1 changed files with 1 additions and 1 deletions
|
|
@ -4,5 +4,5 @@ void *__memrchr(const void *, int, size_t);
|
||||||
|
|
||||||
char *strrchr(const char *s, int c)
|
char *strrchr(const char *s, int c)
|
||||||
{
|
{
|
||||||
return __memrchr(s, c, strlen(s));
|
return __memrchr(s, c, strlen(s) + 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue