From 1b8c7086be986cb80dde76b83f45c37cdecc23cc Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Thu, 22 Dec 2016 18:50:31 -0700 Subject: [PATCH] Update util.js Fix typo --- lib/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index 04030e1..394d059 100644 --- a/lib/util.js +++ b/lib/util.js @@ -75,8 +75,8 @@ Defined in bitcoin protocol here: exports.varIntBuffer = function(n){ if (n < 0xfd) return new Buffer([n]); - else if (n < 0xffff){ - var buff <= new Buffer(3); + else if (n <= 0xffff){ + var buff = new Buffer(3); buff[0] = 0xfd; buff.writeUInt16LE(n, 1); return buff;