mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Merge pull request #13378 from calixteman/10544
Replace terminal null char by a endchar command in CFF charstrings to make OTS happy
This commit is contained in:
commit
3456ed271b
1 changed files with 6 additions and 0 deletions
|
@ -599,6 +599,12 @@ const CFFParser = (function CFFParserClosure() {
|
|||
} else if (value === 11) {
|
||||
state.stackSize = stackSize;
|
||||
return true;
|
||||
} else if (value === 0 && j === data.length) {
|
||||
// Operator 0 is not used according to the current spec and
|
||||
// it's the last char and consequently it's likely a terminator.
|
||||
// So just replace it by endchar command to make OTS happy.
|
||||
data[j - 1] = 14;
|
||||
validationCommand = CharstringValidationData[14];
|
||||
} else {
|
||||
validationCommand = CharstringValidationData[value];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue