File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1201,9 +1201,7 @@ BigInteger.valueOf = nbv;
12011201 */
12021202BigInteger . fromByteArrayUnsigned = function ( ba ) {
12031203 // FIXME: BigInteger doesn't yet support Buffers
1204- if ( Buffer . isBuffer ( ba ) ) {
1205- ba = Array . prototype . map . bind ( ba , function ( x ) { return x } ) ( )
1206- }
1204+ if ( Buffer . isBuffer ( ba ) ) ba = Array . prototype . slice . call ( ba )
12071205
12081206 if ( ! ba . length ) {
12091207 return new BigInteger . valueOf ( 0 ) ;
Original file line number Diff line number Diff line change @@ -339,9 +339,7 @@ Script.prototype.writeOp = function(opcode) {
339339 */
340340Script . prototype . writeBytes = function ( data ) {
341341 // FIXME: Script module doesn't support buffers yet
342- if ( Buffer . isBuffer ( data ) ) {
343- data = Array . prototype . map . bind ( data , function ( x ) { return x } ) ( )
344- }
342+ if ( Buffer . isBuffer ( data ) ) data = Array . prototype . slice . call ( data )
345343
346344 if ( data . length < Opcode . map . OP_PUSHDATA1 ) {
347345 this . buffer . push ( data . length )
You can’t perform that action at this time.
0 commit comments