X64: Fix could miss first byte of opcode match

This commit is contained in:
Katy Coe
2019-10-29 13:44:03 +01:00
parent 925dd99ff7
commit e92d0e5805

View File

@@ -32,8 +32,13 @@ namespace Il2CppInspector
uint i, index;
for (i = 0, index = 0; i < buff.Length && index < opcode.Length; i++)
if (buff[i] != opcode[index++]) {
index = 0;
// Maybe we're starting a new match
if (buff[i] != opcode[index++])
index = 0;
}
if (index < opcode.Length)
return null;