From 6d3401f08b344e8c22f2745815e67785b0809885 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 13 Nov 2016 11:47:52 -0800 Subject: [PATCH] script: better script parse error formatting. --- lib/script/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/script/script.js b/lib/script/script.js index feef16eb..f91e1b41 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -2989,6 +2989,11 @@ Script.format = function format(code) { continue; } + if (value === -1) { + out.push('OP_INVALIDOPCODE'); + break; + } + value = value.toString(16); if (value.length < 2)