From c7054ce25a1e7a979a35a866eb6e2d215588482f Mon Sep 17 00:00:00 2001 From: ferricles Date: Fri, 24 Jun 2022 00:43:24 -0700 Subject: [PATCH] append() number bug fix --- js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/utils.js b/js/utils.js index 0aae108..ca9687b 100644 --- a/js/utils.js +++ b/js/utils.js @@ -379,7 +379,7 @@ Base64 = (function () { //could be split between multiple new ints //reminder that shifts implicitly mod 32 bit_vec[bit_vec.length - 1] |= ((int & ~((~0) << length)) << (this.length)); - if (((this.length + length) % 32 < ((this.length - 1) % 32) + 1) || ((this.length + length) % 32 != 0)) { + if (((this.length - 1) % 32 + 1) + length > 32) { bit_vec.push(int >>> (32 - this.length)); } } else {