mirror of
https://gitlab.com/bztsrc/posix-uefi.git
synced 2024-12-29 05:55:31 +01:00
Fixed issue #29 with strrchr
This commit is contained in:
parent
f8e29c8009
commit
e316fa3f37
1 changed files with 2 additions and 2 deletions
|
@ -195,9 +195,9 @@ char_t *strrchr(const char_t *s, int c)
|
||||||
char_t *e;
|
char_t *e;
|
||||||
if(s) {
|
if(s) {
|
||||||
e = (char_t*)s + strlen(s) - 1;
|
e = (char_t*)s + strlen(s) - 1;
|
||||||
while(s < e) {
|
while(s <= e) {
|
||||||
if(*e == (char_t)c) return e;
|
if(*e == (char_t)c) return e;
|
||||||
s--;
|
e--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue