fix typo in decoder and add a test case

This commit is contained in:
Jörg Breitbart
2019-10-24 17:52:03 +02:00
parent 276463e95e
commit 6d620166b4
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ export class Utf8ToUtf32 {
target[size++] = cp;
}
} else {
if (codepoint < 0x010000 || codepoint > 0x10FFFF) {
if (cp < 0x010000 || cp > 0x10FFFF) {
// illegal codepoint
} else {
target[size++] = cp;