diff options
author | Jonathan Beck | 2009-02-14 14:32:24 +0100 |
---|---|---|
committer | Jonathan Beck | 2009-02-14 14:32:24 +0100 |
commit | 7139de793c8debdf9c18a7eb96f0551feee4c598 (patch) | |
tree | 4191cfa3e30f3c73bfdf9f353bacf15b1c2231ac | |
parent | fabfe89d8b27fc4af4949690c0fb3eefda71bdb6 (diff) | |
download | libplist-7139de793c8debdf9c18a7eb96f0551feee4c598.tar.gz libplist-7139de793c8debdf9c18a7eb96f0551feee4c598.tar.bz2 |
Fix binary dict indexes.
-rw-r--r-- | src/bplist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bplist.c b/src/bplist.c index cc3223f..003bff1 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -759,11 +759,11 @@ static void write_dict(GByteArray * bplist, GNode * node, GHashTable * ref_table buff = (uint8_t *) malloc(size * 2 * dict_param_size); for (i = 0, cur = node->children; cur && i < size; cur = cur->next->next, i++) { - idx1 = GPOINTER_TO_UINT(g_hash_table_lookup(ref_table, cur)); + idx1 = *(uint64_t *) (g_hash_table_lookup(ref_table, cur)); memcpy(buff + i * dict_param_size, &idx1, dict_param_size); byte_convert(buff + i * dict_param_size, dict_param_size); - idx2 = GPOINTER_TO_UINT(g_hash_table_lookup(ref_table, cur->next)); + idx2 = *(uint64_t *)(g_hash_table_lookup(ref_table, cur->next)); memcpy(buff + (i + size) * dict_param_size, &idx2, dict_param_size); byte_convert(buff + (i + size) * dict_param_size, dict_param_size); } |