strrchr: actually, last one was finding "" in "any" at pos 0,

should find at pos LAST...
This commit is contained in:
Denis Vlasenko committed 2008-06-18 20:01:12 +00:00
1 parent d5736c5607
commit 1363f0df15
1 file changed
+1 -1
+1 -1
View File
@@ -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)