From 637b0d5f7c4dab320b86316191ef5b57095c7ad0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 21 Mar 2011 20:29:24 +1100 Subject: [PATCH] yet yet yet yet more BE fixes. --- stream.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/stream.c b/stream.c index 88902e3..3c3db46 100644 --- a/stream.c +++ b/stream.c @@ -1098,12 +1098,15 @@ void *open_stream_in(rzip_control *control, int f, int n, int chunk_bytes) goto failed; } /* Read in the expected chunk size */ - if (unlikely(!ENCRYPT && read_val(control, f, &sinfo->size, sinfo->chunk_bytes))) { - print_err("Failed to read in chunk size in open_stream_in\n"); - goto failed; + if (!ENCRYPT) { + if (unlikely(read_val(control, f, &sinfo->size, sinfo->chunk_bytes))) { + print_err("Failed to read in chunk size in open_stream_in\n"); + goto failed; + } + sinfo->size = le64toh(sinfo->size); + print_maxverbose("Chunk size: %lld\n", sinfo->size); + control->st_size += sinfo->size; } - print_maxverbose("Chunk size: %lld\n", sinfo->size); - control->st_size += sinfo->size; } sinfo->initial_pos = get_readseek(control, f);