The change in 91114d18c broke remapping font paths.

Patch from Mattias Clasen

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/331
This commit is contained in:
Akira TAGOH 2022-09-28 21:39:09 +09:00
parent 0924a35b67
commit fc0e9a78d2
1 changed files with 1 additions and 5 deletions

View File

@ -1467,7 +1467,6 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8
{ {
FcChar8 *new_a = NULL; FcChar8 *new_a = NULL;
FcChar8 *new_b = NULL; FcChar8 *new_b = NULL;
FcChar8 *rs = NULL;
FcBool ret; FcBool ret;
if (a) if (a)
@ -1487,10 +1486,7 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8
} }
} }
/* Override maps with new one if exists */ /* Override maps with new one if exists */
if (FcStrSetMemberAB (set, new_a, new_b, &rs)) FcStrSetDel (set, new_a);
{
FcStrSetDel (set, rs);
}
ret = FcStrSetAddTriple (set, new_a, new_b, salt); ret = FcStrSetAddTriple (set, new_a, new_b, salt);
if (new_a) if (new_a)
FcStrFree (new_a); FcStrFree (new_a);