From ec241891fc9d9e81e4c4846b72b6bb611c68211f Mon Sep 17 00:00:00 2001 From: ferricles Date: Wed, 6 Jul 2022 21:40:50 -0700 Subject: [PATCH] append bug fix + unit tests --- js/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/utils.js b/js/utils.js index 3b997fe..1fcf01f 100644 --- a/js/utils.js +++ b/js/utils.js @@ -347,7 +347,7 @@ Base64 = (function () { this.bits[curr_idx] |= (char << pos); //if we go to the "next" char, update it - if (Math.floor((pos - 1) / 32) < Math.floor((pos + 5) / 32)) { + if (Math.floor(pos / 32) < Math.floor((pos + 5) / 32)) { this.bits[curr_idx + 1] |= (char >>> (6 - (pos + 6) % 32)); } @@ -782,7 +782,6 @@ function deepcopy(obj) { } function bv_test() { - console.log("=====STARTING BITVECTOR UNIT TESTS====="); // Empty Constructor + append str