Use correct upper limit in loop, and return false on failure...

This commit is contained in:
de4dot 2012-08-21 20:17:21 +02:00
parent 3b9ba16df6
commit 58b1b27c69

View File

@ -174,7 +174,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
return false;
var instrs = cctor.Body.Instructions;
for (int i = 0; i < instrs.Count - 4; i++) {
for (int i = 0; i < instrs.Count - 3; i++) {
var ldci4_1 = instrs[i];
if (!DotNetUtils.isLdcI4(ldci4_1))
continue;
@ -199,7 +199,7 @@ namespace de4dot.code.deobfuscators.CryptoObfuscator {
return true;
}
return true;
return false;
}
}
}