mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Fix OTS issue with empty index (#15289)
This commit is contained in:
parent
40f9f7e909
commit
04f78c935c
3 changed files with 13 additions and 3 deletions
|
@ -1864,10 +1864,9 @@ class CFFCompiler {
|
|||
// First 2 bytes contains the number of objects contained into this index
|
||||
const count = objects.length;
|
||||
|
||||
// If there is no object, just create an index. This technically
|
||||
// should just be [0, 0] but OTS has an issue with that.
|
||||
// If there is no object, just create an index.
|
||||
if (count === 0) {
|
||||
return [0, 0, 0];
|
||||
return [0, 0];
|
||||
}
|
||||
|
||||
const data = [(count >> 8) & 0xff, count & 0xff];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue