From df5a7104b1f9ae16dc2b2bdabc6c127a98afd8d4 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sat, 28 Jul 2012 01:58:41 +0100 Subject: [PATCH] Fixes #1638. The case of the incomplete optimisation. --- Objective-J/CFData.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Objective-J/CFData.js b/Objective-J/CFData.js index f4b08f86b..44841fbb9 100644 --- a/Objective-J/CFData.js +++ b/Objective-J/CFData.js @@ -285,7 +285,6 @@ CFData.bytesToUtf16String = function(bytes) return String.fromCharCode.apply(NULL, temp); }; - CFData.encodeBase64Utf16String = function(input) { // charCodeAt returns UTF-16. @@ -293,8 +292,8 @@ CFData.encodeBase64Utf16String = function(input) for (var i = 0; i < input.length; i++) { var c = input.charCodeAt(i); - temp.push(input.charCodeAt(i) & 0xFF); - temp.push((input.charCodeAt(i) & 0xFF00) >> 8); + temp.push(c & 0xFF); + temp.push((c & 0xFF00) >> 8); } return CFData.encodeBase64Array(temp);