]> git.wh0rd.org Git - fontconfig.git/commitdiff
Properly skip past dir caches that contain zero fonts (as occurs in global
authorPatrick Lam <plam@MIT.EDU>
Sun, 8 Jan 2006 10:50:51 +0000 (10:50 +0000)
committerPatrick Lam <plam@MIT.EDU>
Sun, 8 Jan 2006 10:50:51 +0000 (10:50 +0000)
    caches.) Reported by Mike Fabian.

ChangeLog
src/fccache.c

index 7fcda1cdbb6399ecad884b5aa36ea38a87760e2d..091e87293df5aabe58b9b962ebf2eb9e198e3a14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-08  Patrick Lam  <plam@mit.edu>
+        * src/fccache.c (FcDirCacheConsume):
+
+        Properly skip past dir caches that contain zero fonts (as occurs
+        in global caches.)  Reported by Mike Fabian.
+
 2006-01-06  Patrick Lam  <plam@mit.edu>
        * src/fcdbg.c (FcPatternPrint):
 
index 50dc4d1558569125a7846732890b6dc164d9d0f7..99d70417e4c8f3612d36268e2d94ba3bd12c47e6 100644 (file)
@@ -966,7 +966,11 @@ FcDirCacheConsume (int fd, const char * dir, FcFontSet *set)
         return FcFalse;
 
     if (!metadata.count)
+    {
+       pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR));
+       lseek (fd, pos, SEEK_SET);
        return FcTrue;
+    }
 
     pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR));
     current_dir_block = mmap (0, metadata.count,