From a751126dbb656767ed4666cf0e5d3e17349d93d1 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 8 Jan 2008 13:36:29 +0200 Subject: [PATCH] Fixed encoding of empty files. Arguments to is_size_valid() were in wrong order in block_encoder.c. --- src/liblzma/common/block_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c index 77ff78ea..22451b9b 100644 --- a/src/liblzma/common/block_encoder.c +++ b/src/liblzma/common/block_encoder.c @@ -327,7 +327,7 @@ block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator, if (!options->has_eopm && options->uncompressed_size == 0) { // Also Compressed Size must also be zero if it has been // given to us. - if (!is_size_valid(options->compressed_size, 0)) + if (!is_size_valid(0, options->compressed_size)) return LZMA_PROG_ERROR; next->coder->sequence = SEQ_CHECK_FINISH;