Skip to content

Commit 7e4cf2f

Browse files
Putting (bits1 | bits2) expression into a variable (fix for iOS 6 bug)
Previously fixed here: brix#40 More info: https://github.com/Runscope/crypto-js/issues/80
1 parent 73c20dd commit 7e4cf2f

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
@@ -106,7 +106,8 @@
106106
if (i % 4) {
107107
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
108108
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
109-
words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);
109+
var bitsCombined = bits1 | bits2;
110+
words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
110111
nBytes++;
111112
}
112113
}

0 commit comments

Comments
 (0)