Merge pull request #1747 from harfbuzz/cff2-fdselect-fix

fixed faulty FDSelect::sanitize
This commit is contained in:
Ebrahim Byagowi 2019-06-04 10:52:16 +04:30 committed by GitHub
commit 89a7a880a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -655,9 +655,9 @@ struct FDSelect {
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this) && (format == 0 || format == 3) &&
(format == 0)?
((format == 0)?
u.format0.sanitize (c, fdcount):
u.format3.sanitize (c, fdcount)));
u.format3.sanitize (c, fdcount))));
}
bool serialize (hb_serialize_context_t *c, const FDSelect &src, unsigned int num_glyphs)

View File

@ -56,11 +56,11 @@ struct CFF2FDSelect
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this) && (format == 0 || format == 3 || format == 4) &&
(format == 0)?
((format == 0)?
u.format0.sanitize (c, fdcount):
((format == 3)?
u.format3.sanitize (c, fdcount):
u.format4.sanitize (c, fdcount))));
u.format4.sanitize (c, fdcount)))));
}
bool serialize (hb_serialize_context_t *c, const CFF2FDSelect &src, unsigned int num_glyphs)