summaryrefslogtreecommitdiff
path: root/fc-cache
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2006-01-27 05:47:59 +0000
committerPatrick Lam <plam@MIT.EDU>2006-01-27 05:47:59 +0000
commit97293e07dd688b3d81cd6e7ecd5df4cdef4c87d8 (patch)
tree1a5d4d11102577ab2e88b0f29f7eeb66869d51eb /fc-cache
parent3cf9f5cec386ce97bb3cdd1dfe78d0d6999243ea (diff)
Move FcConfigNormalizeFontDir call so that it doesn't result in infinite
recursion (reported by Ronny V. Vindenes).
Diffstat (limited to 'fc-cache')
-rw-r--r--fc-cache/fc-cache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 4900e45..2d6c2c3 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -112,7 +112,7 @@ static int
scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool verbose)
{
int ret = 0;
- FcChar8 *dir;
+ const FcChar8 *dir;
FcFontSet *set;
FcStrSet *subdirs;
FcStrList *sublist;
@@ -124,6 +124,10 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
*/
while ((dir = FcStrListNext (list)))
{
+ dir = FcConfigNormalizeFontDir (config, dir);
+ if (!dir)
+ return FcFalse;
+
if (verbose)
{
printf ("%s: \"%s\": ", program, dir);