summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-04-22 06:27:27 +0000
committerKeith Packard <keithp@keithp.com>2003-04-22 06:27:27 +0000
commit5f84b65a26073141e02152d3e5889fb7cfe459a2 (patch)
tree7abe3f00784ccb5369ecc2f29864fcc39312cabf
parent781f10486df22a422b92114ad438d4d8e74c9b93 (diff)
Handle pattern elements moving during multiple edits
-rw-r--r--src/fccfg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fccfg.c b/src/fccfg.c
index 87c38bc9..36a76a41 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -1232,6 +1232,14 @@ FcConfigSubstituteWithPat (FcConfig *config,
!FcStrCmpIgnoreCase ((FcChar8 *) t->field,
(FcChar8 *) e->field))
{
+ /*
+ * KLUDGE - the pattern may have been reallocated or
+ * things may have been inserted or deleted above
+ * this element by other edits. Go back and find
+ * the element again
+ */
+ if (e != s->edit && st[i].elt)
+ st[i].elt = FcPatternFindElt (p, t->field);
if (!st[i].elt)
t = 0;
break;