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;