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

View File

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