]> git.wh0rd.org - fontconfig.git/blobdiff - src/fclist.c
Fix weird first/not-first lameness in font matches, replacing with target
[fontconfig.git] / src / fclist.c
index 414af11b61884de294a7afd38820313b5d5931cb..e57f2bde96454d595a7e52b36fccbbeda80ba64d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.4 2002/06/02 21:07:56 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.7 2002/06/19 20:08:22 keithp Exp $
  *
  * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -80,7 +80,8 @@ FcObjectSetAdd (FcObjectSet *os, const char *object)
     }
     if (c < 0)
        mid++;
-    memmove (os->objects + mid + 1, os->objects + mid, os->nobject - mid);
+    memmove (os->objects + mid + 1, os->objects + mid, 
+            (os->nobject - mid) * sizeof (const char *));
     os->objects[mid] = object;
     os->nobject++;
     return FcTrue;
@@ -246,6 +247,8 @@ FcListValueHash (FcValue    v)
        return FcCharSetCount (v.u.c);
     case FcTypeFTFace:
        return (FcChar32) v.u.f;
+    case FcTypePattern:
+       return (FcChar32) v.u.p->num;
     }
     return 0;
 }