From 96caba59d29b7d0b9a58dd94857c8d961f6f01c3 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 1 Feb 2011 02:20:20 +0100 Subject: [PATCH] fixed off by one --- lib/binaryParser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/binaryParser.js b/lib/binaryParser.js index 3231597c..ed2de933 100644 --- a/lib/binaryParser.js +++ b/lib/binaryParser.js @@ -23,7 +23,7 @@ var parseBits = function(data, bits, offset, callback) { } var result = 0; - if ((offset % 8) + bits > 8) { + if ((offset % 8) + bits >= 8) { result = callback(0, data[offsetBytes] & mask, firstBits); }