script: minor.
This commit is contained in:
parent
7ce14d13fb
commit
d3ac6eba9e
@ -670,13 +670,13 @@ Script.prototype.execute = function execute(stack, flags, tx, index, version) {
|
||||
case opcodes.OP_PICK:
|
||||
case opcodes.OP_ROLL: {
|
||||
if (stack.length < 2)
|
||||
throw new ScriptError('INVALID_STACK_OPERATION', op);
|
||||
throw new ScriptError('INVALID_STACK_OPERATION', op, ip);
|
||||
|
||||
num = Script.num(stack.top(-1), flags).toNumber();
|
||||
stack.pop();
|
||||
|
||||
if (num < 0 || num >= stack.length)
|
||||
throw new ScriptError('INVALID_STACK_OPERATION', op);
|
||||
throw new ScriptError('INVALID_STACK_OPERATION', op, ip);
|
||||
|
||||
val = stack.top(-num - 1);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user