diff options
author | George Williams <pfaedit@users.sourceforge.net> | 2011-02-18 11:53:34 -0800 |
---|---|---|
committer | George Williams <pfaedit@users.sourceforge.net> | 2011-02-18 11:53:34 -0800 |
commit | 8707f1e41d2e0a4f25eb8af04cc49d67ba85cc58 (patch) | |
tree | 6ecdb6a741775ffe87043036bcdf4537d81e49c0 | |
parent | 80341d1a3055b982c02b960770b092ec02edc940 (diff) |
I put in a test the other day to make sure I never output a number outside the 16bit range when I was generating a ttf/otf file. This was done to check potential erroneous behavior. But there was one place where I was relying on the number being truncated by the routine and so I didn't bother to truncate it myself. This wasn't an error and doesn't need to be flagged. But the correct fix is just to truncate it.
-rw-r--r-- | fontforge/tottfgpos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fontforge/tottfgpos.c b/fontforge/tottfgpos.c index 6857254b..7e1405e6 100644 --- a/fontforge/tottfgpos.c +++ b/fontforge/tottfgpos.c @@ -3211,7 +3211,7 @@ return( NULL ); for ( otf = all; otf!=NULL; otf=otf->next ) if ( otf->lookup_index!=-1 ) { putshort(g___,!otf->needs_extension ? (otf->lookup_type&0xff) : is_gpos ? 9 : 7); - putshort(g___,otf->lookup_flags); + putshort(g___,(otf->lookup_flags&0xffff)); putshort(g___,otf->subcnt); for ( sub = otf->subtables; sub!=NULL; sub=sub->next ) { if ( sub->subtable_offset==-1 ) |