script/tx: decompile returns maybe chunks
This commit is contained in:
parent
58b465f745
commit
581f57ff6f
5 changed files with 17 additions and 11 deletions
src
|
@ -98,11 +98,11 @@ function decompile (buffer) {
|
|||
var d = pushdata.decode(buffer, i)
|
||||
|
||||
// did reading a pushDataInt fail? empty script
|
||||
if (d === null) return []
|
||||
if (d === null) return null
|
||||
i += d.size
|
||||
|
||||
// attempt to read too much data? empty script
|
||||
if (i + d.number > buffer.length) return []
|
||||
if (i + d.number > buffer.length) return null
|
||||
|
||||
var data = buffer.slice(i, i + d.number)
|
||||
i += d.number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue