1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Merge pull request #11810 from Snuffleupagus/fromCodePoint-followup

A couple of small `String.fromCodePoint` improvements (PR 11698 and 11769 follow-up)
This commit is contained in:
Tim van der Meij 2020-04-16 00:08:16 +02:00 committed by GitHub
commit a7def05aa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View file

@ -2587,7 +2587,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
code = unicode;
}
}
if (code > 0 && Number.isInteger(code)) {
if (code > 0 && code <= 0x10ffff && Number.isInteger(code)) {
// If `baseEncodingName` is one the predefined encodings, and `code`
// equals `charcode`, using the glyph defined in the baseEncoding
// seems to yield a better `toUnicode` mapping (fixes issue 5070).