|
|
@ -230,7 +230,21 @@ Script.prototype._chunkToString = function(chunk, type) { |
|
|
|
if (!chunk.buf) { |
|
|
|
// no data chunk
|
|
|
|
if (typeof Opcode.reverseMap[opcodenum] !== 'undefined') { |
|
|
|
str = str + ' ' + Opcode(opcodenum).toString(); |
|
|
|
if (asm) { |
|
|
|
// A few cases where the opcode name differs from reverseMap
|
|
|
|
// aside from 1 to 16 data pushes.
|
|
|
|
if (opcodenum === 0) { |
|
|
|
// OP_0 -> 0
|
|
|
|
str = str + ' 0'; |
|
|
|
} else if(opcodenum === 79) { |
|
|
|
// OP_1NEGATE -> 1
|
|
|
|
str = str + ' -1'; |
|
|
|
} else { |
|
|
|
str = str + ' ' + Opcode(opcodenum).toString(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
str = str + ' ' + Opcode(opcodenum).toString(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
var numstr = opcodenum.toString(16); |
|
|
|
if (numstr.length % 2 !== 0) { |
|
|
@ -244,7 +258,7 @@ Script.prototype._chunkToString = function(chunk, type) { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// data chunk
|
|
|
|
if (opcodenum === Opcode.OP_PUSHDATA1 || |
|
|
|
if (!asm && opcodenum === Opcode.OP_PUSHDATA1 || |
|
|
|
opcodenum === Opcode.OP_PUSHDATA2 || |
|
|
|
opcodenum === Opcode.OP_PUSHDATA4) { |
|
|
|
str = str + ' ' + Opcode(opcodenum).toString(); |
|
|
|