fixed off by one

This commit is contained in:
Alexander Sulfrian 2011-02-01 02:20:20 +01:00
parent 0d36ce0799
commit 96caba59d2

View File

@ -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);
}