summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c2
-rw-r--r--lib/lz4frame.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 39a7de9..85999ae 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1366,7 +1366,7 @@ int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch
lz4sd->prefixEnd += originalSize;
} else {
lz4sd->extDictSize = lz4sd->prefixSize;
- lz4sd->externalDict = (BYTE*)dest - lz4sd->extDictSize;
+ lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize;
result = LZ4_decompress_generic(source, dest, 0, originalSize,
endOnOutputSize, full, 0,
usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
diff --git a/lib/lz4frame.h b/lib/lz4frame.h
index 63d61ad..43bc23c 100644
--- a/lib/lz4frame.h
+++ b/lib/lz4frame.h
@@ -66,7 +66,7 @@ extern "C" {
#endif
#if defined(_MSC_VER)
-# define LZ4F_DEPRECATE(x) __declspec(deprecated) x
+# define LZ4F_DEPRECATE(x) x /* __declspec(deprecated) x - only works with C++ */
#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
# define LZ4F_DEPRECATE(x) x __attribute__((deprecated))
#else
@@ -274,7 +274,7 @@ typedef struct {
* That is, it should be == 0 if decompression has been completed fully and correctly.
*/
LZ4FLIB_API LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_dctx** dctxPtr, unsigned version);
-LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
+LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* const dctx);
/*====== Decompression ======*/