diff --git a/lib/script/script.js b/lib/script/script.js index 74e16a14..0fbb1505 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -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);