]> zoso.dev Git - buffer.git/commitdiff
unicode top should be 0x10FFFF
authorJesse Tane <jesse.tane@gmail.com>
Tue, 11 Aug 2015 03:36:15 +0000 (23:36 -0400)
committerJesse Tane <jesse.tane@gmail.com>
Tue, 11 Aug 2015 05:39:45 +0000 (01:39 -0400)
index.js

index b9a511b579b809a004e57d09ed434d8072ee55ef..cdd3092aebce1d5cf1cae8bfe7c7c8d16addde6c 100644 (file)
--- a/index.js
+++ b/index.js
@@ -1458,7 +1458,7 @@ function utf8ToBytes (string, units) {
         codePoint >> 0x6 & 0x3F | 0x80,
         codePoint & 0x3F | 0x80
       )
-    } else if (codePoint < 0x200000) {
+    } else if (codePoint < 0x110000) {
       if ((units -= 4) < 0) break
       bytes.push(
         codePoint >> 0x12 | 0xF0,