mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 08:29:45 +00:00
strrchr: actually, last one was finding "" in "any" at pos 0,
should find at pos LAST...
This commit is contained in:
parent
d5736c5607
commit
1363f0df15
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user