Skip to content

Commit 38ca594

Browse files
committedDec 29, 2015
Putting (bits1 | bits2) expression into a variable
Fixes iOS 6.x bug described here: https://code.google.com/p/crypto-js/issues/detail?id=80
1 parent ea83723 commit 38ca594

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/enc-base64.js

+2-1
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)
Please sign in to comment.