From 738cde54eda7f1aaaea18fd47fef339ee110e0d5 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 20 Mar 2011 22:31:38 +1100 Subject: [PATCH] More BE fixes. --- lrzip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lrzip.c b/lrzip.c index fc67134..bd41eab 100644 --- a/lrzip.c +++ b/lrzip.c @@ -77,8 +77,9 @@ void write_magic(rzip_control *control) if (ENCRYPT) memcpy(&magic[6], &control->salt, 8); else if (!STDIN || !STDOUT || control->eof) { - memcpy(&magic[6], &control->st_size, 8); - control->st_size = le64toh(control->st_size); + i64 esize = htole64(control->st_size); + + memcpy(&magic[6], &esize, 8); } /* save LZMA compression flags */