mirror of
https://gitlab.com/bztsrc/posix-uefi.git
synced 2024-12-28 06:55:08 +01:00
Fixed issue #33
This commit is contained in:
parent
f9249ab0b6
commit
1ebaf59a90
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ void *memmem(const void *haystack, size_t hl, const void *needle, size_t nl)
|
|||
{
|
||||
uint8_t *c = (uint8_t*)haystack;
|
||||
if(!haystack || !needle || !hl || !nl || nl > hl) return NULL;
|
||||
hl -= nl;
|
||||
hl -= nl - 1;
|
||||
while(hl) {
|
||||
if(!memcmp(c, needle, nl)) return c;
|
||||
c++; hl--;
|
||||
|
|
Loading…
Reference in a new issue