From e49b91d36c7c3281dcb407bc761ee01a51608fe4 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 30 Dec 2024 05:55:34 +0000 Subject: slbt_ar_merge_archives(): properly handle 32-bit pointers vs. 64-bit formats. --- src/arbits/slbt_archive_merge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/arbits') diff --git a/src/arbits/slbt_archive_merge.c b/src/arbits/slbt_archive_merge.c index 9068bf6..5ace063 100644 --- a/src/arbits/slbt_archive_merge.c +++ b/src/arbits/slbt_archive_merge.c @@ -181,6 +181,7 @@ int slbt_ar_merge_archives( int64_t onamestrs; int64_t omemfixup; int64_t atint; + int64_t aroff; char * base; unsigned char * ubase; @@ -592,7 +593,7 @@ int slbt_ar_merge_archives( if (meminfo->ar_file_header.ar_header_attr & AR_HEADER_ATTR_NAME_REF) { nwritten = sprintf( &base[omembers],"/"PPRII64, - namestr - namebase); + (aroff = namestr - namebase)); if (nwritten < 0) SLBT_SYSTEM_ERROR(dctx,0); -- cgit v1.2.3