]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccharset.c
Don't add current_arch_start more than once.
[fontconfig.git] / src / fccharset.c
index 790d78f3c619d1fab28096594f839a21413a5f9f..e152a5a00684b48cdc8fcadadd31b8012b64b35a 100644 (file)
@@ -1379,20 +1379,20 @@ FcCharSetDistributeBytes (FcCache * metadata, void * block_ptr)
     if (!FcCharSetEnsureBank(bi))
        return 0;
 
-    charsets[bi] = (FcCharSet *)block_ptr;
     block_ptr = ALIGN (block_ptr, FcCharSet);
+    charsets[bi] = (FcCharSet *)block_ptr;
     block_ptr = (void *)((char *)block_ptr + 
                     (sizeof (FcCharSet) * charset_count));
-    numbers[bi] = (FcChar16 *)block_ptr;
     block_ptr = ALIGN (block_ptr, FcChar16);
+    numbers[bi] = (FcChar16 *)block_ptr;
     block_ptr = (void *)((char *)block_ptr + 
                     (sizeof(FcChar16) * charset_numbers_count));
-    leaves[bi] = (FcCharLeaf *)block_ptr;
     block_ptr = ALIGN (block_ptr, FcCharLeaf);
+    leaves[bi] = (FcCharLeaf *)block_ptr;
     block_ptr = (void *)((char *)block_ptr +
                     (sizeof(FcCharLeaf) * charset_leaf_count));
-    leaf_idx[bi] = (int *)block_ptr;
     block_ptr = ALIGN (block_ptr, int);
+    leaf_idx[bi] = (int *)block_ptr;
     block_ptr = (void *)((char *)block_ptr +
                     (sizeof(int) * charset_leaf_idx_count));
 
@@ -1438,15 +1438,19 @@ FcCharSetUnserialize (FcCache metadata, void *block_ptr)
     if (!FcCharSetEnsureBank(bi))
        return 0;
 
+    block_ptr = ALIGN (block_ptr, FcCharSet);
     charsets[bi] = (FcCharSet *)block_ptr;
     block_ptr = (void *)((char *)block_ptr + 
                     (sizeof (FcCharSet) * metadata.charset_count));
+    block_ptr = ALIGN (block_ptr, FcChar16);
     numbers[bi] = (FcChar16 *)block_ptr;
     block_ptr = (void *)((char *)block_ptr + 
                     (sizeof(FcChar16) * metadata.charset_numbers_count));
+    block_ptr = ALIGN (block_ptr, FcCharLeaf);
     leaves[bi] = (FcCharLeaf *)block_ptr;
     block_ptr = (void *)((char *)block_ptr +
                     (sizeof(FcCharLeaf) * metadata.charset_leaf_count));
+    block_ptr = ALIGN (block_ptr, int);
     leaf_idx[bi] = (int *)block_ptr;
     block_ptr = (void *)((char *)block_ptr +
                     (sizeof(int) * metadata.charset_leaf_idx_count));