diff --git a/lib/script/script.js b/lib/script/script.js index f11558c9..a3c24bfd 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -2976,6 +2976,9 @@ Script.prototype.getScripthashSigops = function getScripthashSigops(input) { if (!this.isScripthash()) return this.getSigops(true); + if (input.code.length === 0) + return 0; + for (i = 0; i < input.code.length; i++) { op = input.code[i];