[Commit] fontconfig/src fccfg.c,1.32,1.33
commit@keithp.com
commit@keithp.com
Mon, 21 Apr 2003 23:27:29 -0700
Update of /local/src/CVS/fontconfig/src
In directory home.keithp.com:/tmp/cvs-serv30813
Modified Files:
fccfg.c
Log Message:
Handle pattern elements moving during multiple edits
Index: fccfg.c
===================================================================
RCS file: /local/src/CVS/fontconfig/src/fccfg.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- fccfg.c 17 Apr 2003 21:50:24 -0000 1.32
+++ fccfg.c 22 Apr 2003 06:27:27 -0000 1.33
@@ -1232,6 +1232,14 @@
!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;