I've got a for statement, I'm trying to get j++ to function, but it's coming back as "Unreachable code". I've tried removing the j = 0; at the start of the for loop, I've tried casting the int before calling it in the for loop, I've tried just about everything.
Here's the code:
(Ps: It's for a 'Botkiller' Commonly referred to as an Anti-Virus of sorts)
for (int j = 0; j <= Signature.Length; j++)
{
j++;
byte[] Bytes = ReadByte(curAddr + j, (Int32)2048);
if (!(Bytes[j] == Signature[j]))
{
j++;
if (j == Signature.Length - 1)
{
Functions.Respond("Found Malicious Signature in Process: " + GameName + " At address: " + curAddr + ". Attempting to Remove!");
EndProcess.CallExitProcess(ProcID, Path);
}
//else { continue; }
}
break;
}
Now, you'll notice that I've also tried adding j++ within the for loop, but j is only added to once, and then never again.
This post has been edited by macosxnerd101: 30 August 2011 - 07:06 AM
Reason for edit:: Renamed title to be more descriptive

New Topic/Question
Reply



MultiQuote









|