mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #2390 from nbp/extra-font-optim
Ensure Type1Parser_extractFontProgram loop counter is not interpreted as a double.
This commit is contained in:
commit
ae621701c6
1 changed files with 3 additions and 1 deletions
|
@ -4755,7 +4755,9 @@ var Type1Parser = function type1Parser() {
|
|||
i += length;
|
||||
token = '';
|
||||
} else if (isSeparator(c)) {
|
||||
length = parseInt(token, 10);
|
||||
// Use '| 0' to prevent setting a double into length such as the double
|
||||
// does not flow into the loop variable.
|
||||
length = parseInt(token, 10) | 0;
|
||||
token = '';
|
||||
} else {
|
||||
token += c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue