diff --git a/lib/script/opcode.js b/lib/script/opcode.js index 246dd980..8c15e246 100644 --- a/lib/script/opcode.js +++ b/lib/script/opcode.js @@ -207,6 +207,9 @@ Opcode.prototype.toSmall = function toSmall() { */ Opcode.prototype.toNum = function toNum(minimal, limit) { + if (this.value === opcodes.OP_1NEGATE) + return ScriptNum.fromInt(-1); + const smi = this.toSmall(); if (smi !== -1)