mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 07:12:17 +00:00
Fix a bug in Script.parse to allow 0-length pushes.
This commit is contained in:
parent
60748ed72e
commit
dd89369538
@ -512,7 +512,7 @@ public class Script {
|
|||||||
cursor = offset;
|
cursor = offset;
|
||||||
while (cursor < offset + length) {
|
while (cursor < offset + length) {
|
||||||
int opcode = readByte();
|
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.
|
// Read some bytes of data, where how many is the opcode value itself.
|
||||||
chunks.add(new ScriptChunk(false, getData(opcode))); // opcode == len here.
|
chunks.add(new ScriptChunk(false, getData(opcode))); // opcode == len here.
|
||||||
} else if (opcode == OP_PUSHDATA1) {
|
} else if (opcode == OP_PUSHDATA1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user