diff options
Diffstat (limited to 'src/lib/compression')
-rw-r--r-- | src/lib/compression/compression.cpp | 4 | ||||
-rw-r--r-- | src/lib/compression/lzma/lzma.cpp | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/compression/compression.cpp b/src/lib/compression/compression.cpp index 600f2c3ae..8e976d572 100644 --- a/src/lib/compression/compression.cpp +++ b/src/lib/compression/compression.cpp @@ -47,9 +47,9 @@ Transform* make_compressor(const std::string& type, size_t level) if(type == "gzip" || type == "gz") return get_transform("Gzip" + comp_suffix); if(type == "bzip2" || type == "bz2") - return get_transform("Bzip2", comp_suffix); + return get_transform("Bzip2" + comp_suffix); if(type == "lzma" || type == "xz") - return get_transform("LZMA", comp_suffix); + return get_transform("LZMA" + comp_suffix); return nullptr; } diff --git a/src/lib/compression/lzma/lzma.cpp b/src/lib/compression/lzma/lzma.cpp index c7e6ab815..93a969d70 100644 --- a/src/lib/compression/lzma/lzma.cpp +++ b/src/lib/compression/lzma/lzma.cpp @@ -23,10 +23,11 @@ class LZMA_Stream : public Zlib_Style_Stream<lzma_stream, byte> public: LZMA_Stream() { - streamp()->allocator = new ::lzma_allocator; - streamp()->allocator->opaque = alloc(); - streamp()->allocator->alloc = Compression_Alloc_Info::malloc<size_t>; - streamp()->allocator->free = Compression_Alloc_Info::free; + auto a = new ::lzma_allocator; + a->opaque = alloc(); + a->alloc = Compression_Alloc_Info::malloc<size_t>; + a->free = Compression_Alloc_Info::free; + streamp()->allocator = a; } ~LZMA_Stream() |