summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Aurele La France <tsi@ualberta.edu>2002-09-12 20:56:03 +0000
committerMarc Aurele La France <tsi@ualberta.edu>2002-09-12 20:56:03 +0000
commit05336fd8bed5a5f3a6e1cbddb18a9bd9a4d2ebc7 (patch)
tree3f0aca892646a8cf1ce909f76d32d39adce53160
parent9cc935765e6f74a1712b04b6cbcfc5e77d1d38e1 (diff)
Fix structure alignment and array wlk bugsdhd-20020916
-rw-r--r--src/fcpat.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fcpat.c b/src/fcpat.c
index 4da5747..28abe55 100644
--- a/src/fcpat.c
+++ b/src/fcpat.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.15 2002/08/22 07:36:45 keithp Exp $
+ * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.16tsi Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -276,8 +276,8 @@ typedef struct _FcValueListEnt FcValueListEnt;
struct _FcValueListEnt {
FcValueListEnt *next;
- FcChar32 hash;
FcValueList *list;
+ FcChar32 hash, pad;
};
static int FcValueListFrozenCount[FcTypeLangSet + 1];
@@ -336,7 +336,7 @@ FcValueListEntCreate (FcValueList *h)
e->list = (FcValueList *) (e + 1);
strs = (FcChar8 *) (e->list + n);
new = e->list;
- for (l = h; l; l = l->next)
+ for (l = h; l; l = l->next, new++)
{
if (l->value.type == FcTypeString)
{
@@ -346,7 +346,10 @@ FcValueListEntCreate (FcValueList *h)
strs += strlen ((char *) strs) + 1;
}
else
- new->value = FcValueSave (l->value);
+ {
+ new->value = l->value;
+ new->value = FcValueSave (new->value);
+ }
new->binding = l->binding;
if (l->next)
new->next = new + 1;