Skip to content

Commit a4209a2

Browse files
committed
Handle possibly malformed UTF-16
1 parent 3144906 commit a4209a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plutoscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ const utf32_to_utf8 = function(utf8/*: array */, utf32/*: number */)/*: void */
446446
const utf16_to_utf8 = function(str)
447447
{
448448
let arr = [];
449-
for(let i = 0; i != str.length; ++i)
449+
for(let i = 0; i < str.length; ++i)
450450
{
451451
let c = str.charCodeAt(i);
452452
if ((c >> 10) == 0x36) // Surrogate pair?

0 commit comments

Comments
 (0)