X64: Fix could miss first byte of opcode match
This commit is contained in:
@@ -32,9 +32,14 @@ namespace Il2CppInspector
|
|||||||
uint i, index;
|
uint i, index;
|
||||||
|
|
||||||
for (i = 0, index = 0; i < buff.Length && index < opcode.Length; i++)
|
for (i = 0, index = 0; i < buff.Length && index < opcode.Length; i++)
|
||||||
if (buff[i] != opcode[index++])
|
if (buff[i] != opcode[index++]) {
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
|
// Maybe we're starting a new match
|
||||||
|
if (buff[i] != opcode[index++])
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (index < opcode.Length)
|
if (index < opcode.Length)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user