projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5736c5
)
strrchr: actually, last one was finding "" in "any" at pos 0,
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 18 Jun 2008 20:01:12 +0000
(20:01 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 18 Jun 2008 20:01:12 +0000
(20:01 -0000)
should find at pos LAST...
libbb/strrstr.c
patch
|
blob
|
history
diff --git
a/libbb/strrstr.c
b/libbb/strrstr.c
index 088d9f45733934d1aa863fde08d3ecee865a94c2..f61dd517fa32f643cb99a0fe98eddcf433bcf176 100644
(file)
--- a/
libbb/strrstr.c
+++ b/
libbb/strrstr.c
@@
-24,7
+24,7
@@
char* strrstr(const char *haystack, const char *needle)
char *r = NULL;
if (!needle[0])
- return (char*)haystack;
+ return (char*)haystack
+ strlen(haystack)
;
while (1) {
char *p = strstr(haystack, needle);
if (!p)