mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user