Avoiding 'pc is undefined' failures

This commit is contained in:
Yury Delendik 2013-10-30 10:54:19 -05:00
parent aeab4a139f
commit 83e17c2953
3 changed files with 19 additions and 0 deletions

View File

@ -3507,6 +3507,11 @@ var Font = (function FontClosure() {
callstack.push({data: data, i: i, stackTop: stack.length - 1});
functionsCalled.push(funcId);
var pc = ttContext.functionsDefined[funcId];
if (!pc) {
warn('TT: CALL non-existent function');
ttContext.hintsValid = false;
return;
}
data = pc.data;
i = pc.i;
}
@ -3527,6 +3532,11 @@ var Font = (function FontClosure() {
lastEndf = i;
} else {
var pc = callstack.pop();
if (!pc) {
warn('TT: ENDF bad stack');
ttContext.hintsValid = false;
return;
}
var funcId = functionsCalled.pop();
data = pc.data;
i = pc.i;

View File

@ -0,0 +1 @@
https://dl.dropboxusercontent.com/s/ls9pn5hww7fer8g/pdfPrintDelFor%260%40-CN.pdf?token_hash=AAHBhbxH7bHCtUESjOikWXAh7YQfCczr3lgcn7Fbq9WEUA&disable_range=1

View File

@ -918,6 +918,14 @@
"link": true,
"type": "eq"
},
{ "id": "issue3405",
"file": "pdfs/issue3405.pdf",
"md5": "58bd4bf790f15f849d1c932e3eda0406",
"rounds": 1,
"lastPage": 1,
"link": true,
"type": "eq"
},
{ "id": "issue2006",
"file": "pdfs/issue2006.pdf",
"md5": "71ec73831ece9b508ad20efa6ff28642",