提交 aefd0f69 编写于 作者: R Rich Felker

fix failure of strrchr(str, 0)

bug report and solution by Richard Pennington
上级 3f25354e
...@@ -4,5 +4,5 @@ void *__memrchr(const void *, int, size_t); ...@@ -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);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册