summaryrefslogtreecommitdiffstats
path: root/lib/lz4frame.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-04-12 14:17:10 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-04-12 14:17:10 (GMT)
commit2852b9e439d7ad27c09641b1b5d108887a159a01 (patch)
tree4d7732a8d3abdec51632da4398cd29549a8e4cb0 /lib/lz4frame.c
parent8f49666cbc5486693b84f210a1af6b71fff1133e (diff)
downloadlz4-2852b9e439d7ad27c09641b1b5d108887a159a01.zip
lz4-2852b9e439d7ad27c09641b1b5d108887a159a01.tar.gz
lz4-2852b9e439d7ad27c09641b1b5d108887a159a01.tar.bz2
Fixed issue #84
Diffstat (limited to 'lib/lz4frame.c')
-rw-r--r--lib/lz4frame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 7094364..31cf9a5 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -447,10 +447,10 @@ size_t LZ4F_compressBegin(LZ4F_compressionContext_t compressionContext, void* ds
headerStart = dstPtr;
/* FLG Byte */
- *dstPtr++ = ((1 & _2BITS) << 6) /* Version('01') */
+ *dstPtr++ = (BYTE)(((1 & _2BITS) << 6) /* Version('01') */
+ ((cctxPtr->prefs.frameInfo.blockMode & _1BIT ) << 5) /* Block mode */
- + (BYTE)((cctxPtr->prefs.frameInfo.contentChecksumFlag & _1BIT ) << 2) /* Frame checksum */
- + (BYTE)((cctxPtr->prefs.frameInfo.contentSize > 0) << 3); /* Frame content size */
+ + ((cctxPtr->prefs.frameInfo.contentChecksumFlag & _1BIT ) << 2) /* Frame checksum */
+ + ((cctxPtr->prefs.frameInfo.contentSize > 0) << 3)); /* Frame content size */
/* BD Byte */
*dstPtr++ = (BYTE)((cctxPtr->prefs.frameInfo.blockSizeID & _3BITS) << 4);
/* Optional Frame content size field */