lib/bitcoin/script.rb in bitcoin-ruby-0.0.12 vs lib/bitcoin/script.rb in bitcoin-ruby-0.0.13

- old
+ new

@@ -1433,11 +1433,13 @@ end def sighash_subscript(drop_sigs, opts = {}) if opts[:fork_id] drop_sigs.reject! do |signature| - _, hash_type = parse_sig(signature) - (hash_type&SIGHASH_TYPE[:forkid]) != 0 + if signature && signature.size > 0 + _, hash_type = parse_sig(signature) + (hash_type&SIGHASH_TYPE[:forkid]) != 0 + end end end if inner_p2sh? && @inner_script_code ::Bitcoin::Script.new(@inner_script_code).to_binary_without_signatures(drop_sigs)