commit | 1363f0df150e26c9457a8ccbe35580843bae3319 | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Wed Jun 18 20:01:12 2008 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Wed Jun 18 20:01:12 2008 +0000 |
tree | f851a241bc9fd2500844f73be27ae77de59fc281 | |
parent | d5736c560703725d13c88234f03e82693212c265 [diff] |
strrchr: actually, last one was finding "" in "any" at pos 0, should find at pos LAST...
diff --git a/libbb/strrstr.c b/libbb/strrstr.c index 088d9f4..f61dd51 100644 --- a/libbb/strrstr.c +++ b/libbb/strrstr.c
@@ -24,7 +24,7 @@ char *r = NULL; if (!needle[0]) - return (char*)haystack; + return (char*)haystack + strlen(haystack); while (1) { char *p = strstr(haystack, needle); if (!p)