- removing a typo in ftccache.i that prevented it from compiling correctly

- fixed the infamous bug that caused the cache to crash with large fonts.
  the hash table buckets array wasn't shrinked correctly during cache
  flushes..
This commit is contained in:
David Turner 2002-06-08 13:48:41 +00:00
parent 57127f73b9
commit 426b4aa8ba
2 changed files with 8 additions and 6 deletions

View File

@ -211,7 +211,7 @@
cache->mask >>= 1;
p = cache->mask;
if ( FT_RENEW_ARRAY( cache->buckets, ( mask + 1 ) * 2, mask ) )
if ( FT_RENEW_ARRAY( cache->buckets, ( mask + 1 ) * 2, (mask+1) ) )
{
FT_ERROR(( "ftc_node_hash_unlink: couldn't shunk buckets!\n" ));
goto Exit;

View File

@ -79,6 +79,7 @@
hash = query->hash;
#ifdef FTC_CACHE_USE_LINEAR_HASHING
{
FT_UInt index;
@ -87,6 +88,7 @@
index = hash & ( cache->mask * 2 + 1 );
bucket = cache->buckets + index;
}
#else
bucket = cache->buckets + ( hash % cache->size );
#endif