diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.38 1999/11/22 17:39:51 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.39 1999/12/27 17:33:22 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -382,7 +382,7 @@ static const char *memfind (const char *s1, long l1, const char *s2, long l2) { | |||
382 | const char *init; /* to search for a `*s2' inside `s1' */ | 382 | const char *init; /* to search for a `*s2' inside `s1' */ |
383 | l2--; /* 1st char will be checked by `memchr' */ | 383 | l2--; /* 1st char will be checked by `memchr' */ |
384 | l1 = l1-l2; /* `s2' cannot be found after that */ | 384 | l1 = l1-l2; /* `s2' cannot be found after that */ |
385 | while (l1 > 0 && (init = memchr(s1, *s2, l1)) != NULL) { | 385 | while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) { |
386 | init++; /* 1st char is already checked */ | 386 | init++; /* 1st char is already checked */ |
387 | if (memcmp(init, s2+1, l2) == 0) | 387 | if (memcmp(init, s2+1, l2) == 0) |
388 | return init-1; | 388 | return init-1; |