From 05a98eaf4bd23fe1035660a9a2b1018abdfc9c6e Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Sun, 8 Jan 2006 10:50:51 +0000 Subject: [PATCH] Properly skip past dir caches that contain zero fonts (as occurs in global caches.) Reported by Mike Fabian. --- ChangeLog | 6 ++++++ src/fccache.c | 4 ++++ 2 files changed, 10 insertions(+) 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, -- 2.39.5