From: Rich Felker Date: Sat, 26 May 2012 22:01:34 +0000 (-0400) Subject: fix failure of strrchr(str, 0) X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=aefd0f69bd22b825a6196e65b40a02e79fec23b5 fix failure of strrchr(str, 0) bug report and solution by Richard Pennington --- diff --git a/src/string/strrchr.c b/src/string/strrchr.c index 9c683087..635fb3c1 100644 --- a/src/string/strrchr.c +++ b/src/string/strrchr.c @@ -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); }