forked from Public-Mirror/Textractor
engine bugfix
This commit is contained in:
parent
0d3597a91d
commit
cda2914a27
@ -49,8 +49,11 @@ DWORD SearchPattern(DWORD base, DWORD base_length, LPCVOID search, DWORD search_
|
|||||||
{
|
{
|
||||||
// Artikash 7/14/2018: not sure, but I think this could throw read access violation if I dont subtract search_length
|
// Artikash 7/14/2018: not sure, but I think this could throw read access violation if I dont subtract search_length
|
||||||
for (int i = 0; i < base_length - search_length; ++i)
|
for (int i = 0; i < base_length - search_length; ++i)
|
||||||
if (memcmp((void*)(base + i), search, search_length) == 0)
|
for (int j = 0; j <= search_length; ++j)
|
||||||
return i;
|
if (j == search_length) return i; // not sure about this algorithm...
|
||||||
|
else if (*((BYTE*)base + i + j) != *((BYTE*)search + j) && *((BYTE*)search + j) != 0x11) break; // 0x11 = wildcard
|
||||||
|
//if (memcmp((void*)(base + i), search, search_length) == 0)
|
||||||
|
//return i;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user