mirror of git://git.musl-libc.org/musl
fix failure of strrchr(str, 0)
bug report and solution by Richard Pennington
This commit is contained in:
parent
3f25354e62
commit
aefd0f69bd
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue