Skip to content

Commit ee286f9

Browse files
committed
Merge pull request brix#40 from aaron-schmidt/patch-1
Putting (bits1 | bits2) expression into a variable
2 parents ea83723 + 38ca594 commit ee286f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/enc-base64.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
if (i % 4) {
9191
var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);
9292
var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);
93-
words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);
93+
var bitsCombined = bits1 | bits2;
94+
words[nBytes >>> 2] |= (bitsCombined) << (24 - (nBytes % 4) * 8);
9495
nBytes++;
9596
}
9697
}

0 commit comments

Comments
 (0)