]> wimlib.net Git - wimlib/blobdiff - src/lzx-compress.c
Fix wimlib_lzx_compress()
[wimlib] / src / lzx-compress.c
index ea55fca42f9ab24ae3c87373328ac2b750344af6..a6883ac077a68d36fe91c5c62fc0388c95910114 100644 (file)
@@ -2653,7 +2653,7 @@ wimlib_lzx_alloc_context(const struct wimlib_lzx_params *params,
 
        if (params == NULL) {
                LZX_DEBUG("Using default algorithm and parameters.");
-               params = &slow_default;
+               params = &fast_default;
        }
 
        if (params->algorithm != WIMLIB_LZX_ALGORITHM_SLOW &&
@@ -2838,7 +2838,7 @@ wimlib_lzx_compress(const void * const restrict uncompressed_data,
                    void       * const restrict compressed_data)
 {
        int ret;
-       struct wimlib_lzx_context *ctx;
+       struct wimlib_lzx_context *ctx = NULL;
        unsigned compressed_len;
 
        ret = wimlib_lzx_alloc_context(NULL, &ctx);