diff options
author | Nikias Bassen | 2020-05-14 19:21:30 +0200 |
---|---|---|
committer | Nikias Bassen | 2020-05-14 19:21:30 +0200 |
commit | 84b71c90bf7b0f904c516188a6fe170b3eb0cfb4 (patch) | |
tree | 5c7b335530d5c7c9ac8997492633bcdfd5c6e8fe /src | |
parent | a2d66545d1303dd2cb5e0d56761aaf8a96bbc282 (diff) | |
download | libplist-84b71c90bf7b0f904c516188a6fe170b3eb0cfb4.tar.gz libplist-84b71c90bf7b0f904c516188a6fe170b3eb0cfb4.tar.bz2 |
bplist: Prevent 32bit compiler warning
Diffstat (limited to 'src')
-rw-r--r-- | src/bplist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bplist.c b/src/bplist.c index d98227a..14db755 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -1170,6 +1170,7 @@ PLIST_API void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) uint64_t offset_table_index = 0; bytearray_t *bplist_buff = NULL; uint64_t i = 0; + uint64_t buff_len = 0; uint64_t *offsets = NULL; bplist_trailer_t trailer; uint64_t objects_len = 0; @@ -1349,7 +1350,8 @@ PLIST_API void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) hash_table_destroy(ref_table); //write offsets - offset_size = get_needed_bytes(bplist_buff->len); + buff_len = bplist_buff->len; + offset_size = get_needed_bytes(buff_len); offset_table_index = bplist_buff->len; for (i = 0; i < num_objects; i++) { uint64_t offset = be64toh(offsets[i]); |