mirror of
https://github.com/fluencelabs/musl
synced 2025-06-12 14:31:37 +00:00
fix failure of strrchr(str, 0)
bug report and solution by Richard Pennington
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user