Replace the original path to the new one

This commit is contained in:
Akira TAGOH 2017-09-19 20:21:22 +09:00
parent 6f226ad67e
commit 6d3b306cbe
2 changed files with 5 additions and 3 deletions

View File

@ -448,7 +448,6 @@ FcListAppend (FcListHashTable *table,
e = FcPatternObjectFindElt (font, FcObjectFromName (os->objects[o])); e = FcPatternObjectFindElt (font, FcObjectFromName (os->objects[o]));
if (e) if (e)
{ {
idx = 0;
if (FcRefIsConst (&font->ref) && !strcmp (os->objects[o], FC_FILE)) if (FcRefIsConst (&font->ref) && !strcmp (os->objects[o], FC_FILE))
{ {
struct stat statb; struct stat statb;
@ -481,13 +480,13 @@ FcListAppend (FcListHashTable *table,
} }
FcStrFree (s); FcStrFree (s);
FcStrFree (dir); FcStrFree (dir);
idx++; goto bail3;
} }
else else
FcStrFree (dir); FcStrFree (dir);
} }
} }
for (v = FcPatternEltValues(e); v; for (v = FcPatternEltValues(e), idx = 0; v;
v = FcValueListNext(v), ++idx) v = FcValueListNext(v), ++idx)
{ {
if (!FcPatternAdd (bucket->pattern, if (!FcPatternAdd (bucket->pattern,
@ -495,6 +494,7 @@ FcListAppend (FcListHashTable *table,
FcValueCanonicalize(&v->value), defidx != idx)) FcValueCanonicalize(&v->value), defidx != idx))
goto bail2; goto bail2;
} }
bail3:;
} }
} }
*prev = bucket; *prev = bucket;

View File

@ -670,6 +670,7 @@ FcFontRenderPrepare (FcConfig *config,
FcTrue); FcTrue);
FcStrFree (s); FcStrFree (s);
FcStrFree (dir); FcStrFree (dir);
goto bail0;
} }
else else
FcStrFree (dir); FcStrFree (dir);
@ -678,6 +679,7 @@ FcFontRenderPrepare (FcConfig *config,
FcPatternObjectListAdd (new, fe->object, FcPatternObjectListAdd (new, fe->object,
FcValueListDuplicate (FcPatternEltValues (fe)), FcValueListDuplicate (FcPatternEltValues (fe)),
FcTrue); FcTrue);
bail0:;
} }
} }
for (i = 0; i < pat->num; i++) for (i = 0; i < pat->num; i++)