0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

librb: minor adjustments to rb_strcasestr fallback to avoid warnings.

This commit is contained in:
Elizabeth Myers 2016-04-10 10:10:46 -05:00
parent 7a21fb5b34
commit 9af0d38291

View file

@ -213,9 +213,9 @@ rb_strcasestr(const char *s, const char *find)
size_t len_f = strlen(find);
if(*s == '\0')
return s;
return (char *)s;
for(char *c = s; *c != '\0'; c++)
for(char *c = (char *)s; *c != '\0'; c++)
{
if(*c == *find && strncasecmp(c, find, len_f) == 0)
return c;