aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/block_buffer_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-08-05 22:03:30 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-08-05 22:03:30 +0300
commit0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6 (patch)
treeb3bf3edf8e17dcb53f0bad5edc6403947a5ef72d /src/liblzma/common/block_buffer_encoder.c
parentliblzma: Use lzma_memcmplen() in the BT3 match finder. (diff)
downloadxz-0e0f34b8e4f1c60ecaec15c2105982381cc9c3e6.tar.xz
liblzma: Add support for lzma_block.ignore_check.
Note that this slightly changes how lzma_block_header_decode() has been documented. Earlier it said that the .version is set to the lowest required value, but now it says that the .version field is kept unchanged if possible. In practice this doesn't affect any old code, because before this commit the only possible .version was 0.
Diffstat (limited to 'src/liblzma/common/block_buffer_encoder.c')
-rw-r--r--src/liblzma/common/block_buffer_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liblzma/common/block_buffer_encoder.c b/src/liblzma/common/block_buffer_encoder.c
index dcd574e9..39e263aa 100644
--- a/src/liblzma/common/block_buffer_encoder.c
+++ b/src/liblzma/common/block_buffer_encoder.c
@@ -233,7 +233,7 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
// The contents of the structure may depend on the version so
// check the version before validating the contents of *block.
- if (block->version != 0)
+ if (block->version > 1)
return LZMA_OPTIONS_ERROR;
if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX