From 164d31ee3d05c48973285885b1d646e583f130f8 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 25 Mar 2014 17:23:01 +1100 Subject: [PATCH] VarInt now uses correct prefix for 64-bit --- src/convert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/convert.js b/src/convert.js index d09942a..ddf4282 100644 --- a/src/convert.js +++ b/src/convert.js @@ -131,7 +131,7 @@ function numToVarInt(num) { if (num < 253) return [num]; if (num < 65536) return [253].concat(numToBytes(num, 2)); if (num < 4294967296) return [254].concat(numToBytes(num, 4)); - return [253].concat(numToBytes(num, 8)); + return [255].concat(numToBytes(num, 8)); } function bytesToWords(bytes) {