3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Fix a bug in Script.parse to allow 0-length pushes.

This commit is contained in:
Matt Corallo 2012-08-01 20:58:52 +02:00 committed by Mike Hearn
parent 60748ed72e
commit dd89369538

View File

@ -512,7 +512,7 @@ public class Script {
cursor = offset;
while (cursor < offset + length) {
int opcode = readByte();
if (opcode > 0 && opcode < OP_PUSHDATA1) {
if (opcode >= 0 && opcode < OP_PUSHDATA1) {
// Read some bytes of data, where how many is the opcode value itself.
chunks.add(new ScriptChunk(false, getData(opcode))); // opcode == len here.
} else if (opcode == OP_PUSHDATA1) {