script: fix potential uncaught error.
This commit is contained in:
parent
dcef9beed5
commit
efa0d3eac5
@ -2976,6 +2976,9 @@ Script.prototype.getScripthashSigops = function getScripthashSigops(input) {
|
|||||||
if (!this.isScripthash())
|
if (!this.isScripthash())
|
||||||
return this.getSigops(true);
|
return this.getSigops(true);
|
||||||
|
|
||||||
|
if (input.code.length === 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
for (i = 0; i < input.code.length; i++) {
|
for (i = 0; i < input.code.length; i++) {
|
||||||
op = input.code[i];
|
op = input.code[i];
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user