www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 3f165a4dc39b273523b9350d0e3fb35134ea039b
parent 1c4eebff0b4c1cea182873aa0e8822de46514583
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 10 Apr 2012 20:00:54 -0400

Fix stringToUTF8Array

Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1515,14 +1515,14 @@ Zotero.Utilities = { var val = string.charCodeAt(i); if(val >= 128) { if(val >= 2048) { - array[offset] = ((val >>> 6) | 192); - array[offset+1] = (val & 63) | 128; - offset += 2; - } else { array[offset] = (val >>> 12) | 224; array[offset+1] = ((val >>> 6) & 63) | 128; array[offset+2] = (val & 63) | 128; offset += 3; + } else { + array[offset] = ((val >>> 6) | 192); + array[offset+1] = (val & 63) | 128; + offset += 2; } } else { array[offset++] = val;