From f62875efada3bc194afb809bbcac32484b5b7940 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Mon, 6 Jan 2014 14:52:23 -0500 Subject: [PATCH] negative indexes don't work in javascript --- Script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Script.js b/Script.js index 4c2aa49..dc76edf 100644 --- a/Script.js +++ b/Script.js @@ -118,8 +118,8 @@ function spec(b) { { return (this.chunks.length > 3 && isSmallIntOp(this.chunks[0]) && - isSmallIntOp(this.chunks[-2]) && - this.chunks[-1] == OP_CHECKMULTISIG); + isSmallIntOp(this.chunks[this.chunks.length-2]) && + this.chunks[this.chunks.length-1] == OP_CHECKMULTISIG); }; // is this a script form we know?