diff options
author | Patrick Lam <plam@MIT.EDU> | 2005-11-17 15:43:39 +0000 |
---|---|---|
committer | Patrick Lam <plam@MIT.EDU> | 2005-11-17 15:43:39 +0000 |
commit | 1c5b6345b9023dee7962468fccb678b5f2e56ce3 (patch) | |
tree | b72dbd8813455d211e7cc1a5fbfb91d0ed82c29b /src/fcname.c | |
parent | 8e351527bb87798e9b796e12a3b1ee6229536a28 (diff) | |
download | fontconfig-1c5b6345b9023dee7962468fccb678b5f2e56ce3.tar.gz |
Don't add current_arch_start more than once.
Fix ordering of ALIGN with respect to saving block_ptr; add another ALIGN
to fcfs.c.
reviewed by: plam
Diffstat (limited to 'src/fcname.c')
-rw-r--r-- | src/fcname.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fcname.c b/src/fcname.c index 6ca4f1a..bf265bd 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -341,11 +341,11 @@ FcObjectNeededBytesAlign (void) void * FcObjectDistributeBytes (FcCache * metadata, void * block_ptr) { - *(int *)block_ptr = biggest_known_ntypes; block_ptr = ALIGN (block_ptr, int); + *(int *)block_ptr = biggest_known_ntypes; block_ptr = (int *) block_ptr + 1; - biggest_ptr = block_ptr; block_ptr = ALIGN (block_ptr, char); + biggest_ptr = block_ptr; block_ptr = (char *) block_ptr + biggest_known_count; return block_ptr; } @@ -367,6 +367,7 @@ FcObjectUnserialize (FcCache metadata, void *block_ptr) { int new_biggest; new_biggest = *(int *)block_ptr; + block_ptr = ALIGN (block_ptr, int); block_ptr = (int *) block_ptr + 1; if (biggest_known_ntypes < new_biggest) { @@ -409,6 +410,7 @@ FcObjectUnserialize (FcCache metadata, void *block_ptr) biggest_known_ntypes = new_biggest; biggest_known_types = (const FcObjectType *)bn; } + block_ptr = ALIGN (block_ptr, char); block_ptr = (char *) block_ptr + biggest_known_count; return block_ptr; } |