From 5328250d06ff5cc4fecbe88d526d3fe5f1d6fe84 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 18 Feb 2014 13:57:52 -0700 Subject: [PATCH] Fix packInt64 --- lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index da2b092..2029cc9 100644 --- a/lib/util.js +++ b/lib/util.js @@ -203,7 +203,7 @@ exports.packUInt32BE = function(num){ exports.packInt64LE = function(num){ var buff = new Buffer(8); buff.writeUInt32LE(num % Math.pow(2, 32), 0); - buff.writeUInt32LE(Math.floor(num / Math.pow(2, 32)), 5); + buff.writeUInt32LE(Math.floor(num / Math.pow(2, 32)), 4); return buff; };