diff options
author | David Turner <david@freetype.org> | 2003-12-21 01:41:32 +0000 |
---|---|---|
committer | David Turner <david@freetype.org> | 2003-12-21 01:41:32 +0000 |
commit | 89f331b7130c22fd93bb1b15381eae9c6da2a8a5 (patch) | |
tree | e4b1b21a12ce606bf8b81e388eca150083abefd4 /src/cache/ftcsbits.c | |
parent | 32174ffba29883763853c45b74fd75ef59508c70 (diff) | |
download | freetype-89f331b7130c22fd93bb1b15381eae9c6da2a8a5.tar.gz |
important bug fixes for new cache code
Diffstat (limited to 'src/cache/ftcsbits.c')
-rw-r--r-- | src/cache/ftcsbits.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index d708d3398..353099330 100644 --- a/src/cache/ftcsbits.c +++ b/src/cache/ftcsbits.c @@ -91,7 +91,7 @@ FTC_SFamilyClass clazz; - if ( (FT_UInt)gindex >= gnode->gindex + snode->count ) + if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count ) { FT_ERROR(( "ftc_snode_load: invalid glyph index" )); return FTC_Err_Invalid_Argument; @@ -267,7 +267,8 @@ FT_UInt gindex = gquery->gindex; FT_Bool result; - result = FT_BOOL( (FT_UInt)(gindex - gnode->gindex) < snode->count ); + result = FT_BOOL( gnode->family == gquery->family && + (FT_UInt)(gindex - gnode->gindex) < snode->count ); if ( result ) { /* check if we need to load the glyph bitmap now */ |