3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00

Remove incorrect execution of OP_0. That code was never reached, because OP_0 is not an opcode in terms of chunk.isOpCode()). However, it lead to believe that OP_0 pushes the vector [0], rather than correctly the empty vector to the stack.

Because the code was never executed, this bug could never trigger a test. Afaict, script.cpp does not have the corresponding case in its switch block.
This commit is contained in:
Andreas Schildbach 2014-03-10 09:31:48 +01:00 committed by Mike Hearn
parent b17533f8fb
commit 22f5e45811

View File

@ -660,10 +660,7 @@ public class Script {
continue;
switch(opcode) {
case OP_0:
// This is also OP_FALSE (they are both zero).
stack.add(new byte[]{0});
break;
// OP_0 is no opcode
case OP_1NEGATE:
stack.add(Utils.reverseBytes(Utils.encodeMPI(BigInteger.ONE.negate(), false)));
break;