diff --git a/index.js b/index.js index 3cf497d..4aaf49f 100644 --- a/index.js +++ b/index.js @@ -46,8 +46,8 @@ module.exports = function base32Decode (input, variant) { bits += 5 if (bits >= 8) { - output[index++] = (value >>> (bits - 8)) & 255 bits -= 8 + output[index++] = value >>> bits } }