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:
Yury Delendik 2012-11-16 11:31:15 -08:00
commit ae621701c6

View File

@ -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;