fix strstr. Seems the function never worked before, except the searched
substring is at the end. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3978 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8dcd50b155
commit
0d348f919c
|
@ -234,7 +234,7 @@ char *strstr(const char *h, const char *n)
|
|||
int i;
|
||||
|
||||
for (i = 0; i <= hn - nn; i++)
|
||||
if (!strcmp(&h[i], n))
|
||||
if (!memcmp(&h[i], n, nn))
|
||||
return (char *)&h[i];
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue