From: Patrick Lam Date: Sun, 8 Jan 2006 10:50:51 +0000 (+0000) Subject: Properly skip past dir caches that contain zero fonts (as occurs in global X-Git-Tag: fc-2_3_94~72 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=05a98eaf4bd23fe1035660a9a2b1018abdfc9c6e;p=fontconfig.git Properly skip past dir caches that contain zero fonts (as occurs in global caches.) Reported by Mike Fabian. --- diff --git a/ChangeLog b/ChangeLog index 7fcda1c..091e872 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-08 Patrick Lam + * 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 * src/fcdbg.c (FcPatternPrint): diff --git a/src/fccache.c b/src/fccache.c index 50dc4d1..99d7041 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -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,