fixup! Add memmem(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2024-06-23 19:01:51 +02:00
parent ae6b1ed45a
commit f460bb78aa

View file

@ -24,7 +24,7 @@ void* memmem(const void* haystack, size_t haystack_size,
const void* needle, size_t needle_size)
{
if ( !needle_size )
return haystack;
return (void*) haystack;
if ( haystack_size < needle_size )
return NULL;
for ( size_t i = 0; i < haystack_size - needle_size; i++ )