Avoiding 'pc is undefined' failures
This commit is contained in:
parent
aeab4a139f
commit
83e17c2953
@ -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;
|
||||
|
1
test/pdfs/issue3405.pdf.link
Normal file
1
test/pdfs/issue3405.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://dl.dropboxusercontent.com/s/ls9pn5hww7fer8g/pdfPrintDelFor%260%40-CN.pdf?token_hash=AAHBhbxH7bHCtUESjOikWXAh7YQfCczr3lgcn7Fbq9WEUA&disable_range=1
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user