Fix error in strrch()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3501 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-04-13 22:47:04 +00:00
parent 10538a3f2e
commit f166caf9f0
4 changed files with 60 additions and 2 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ char *strrchr(const char *s, int c)
if (s)
{
const char *p = &s[strlen(s) - 1];
for (; p > s; p--)
for (; p >= s; p--)
{
if (*p == c)
{