]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix incorrect usage of cycleLog() in --patch-from
authorsenhuang42 <senhuang96@fb.com>
Tue, 13 Oct 2020 17:00:27 +0000 (13:00 -0400)
committersenhuang42 <senhuang96@fb.com>
Tue, 13 Oct 2020 17:00:27 +0000 (13:00 -0400)
programs/fileio.c

index 76e5cbf57772fe931b5f4389f87f78c30376a4e6..0ae549af283d9858e0c362202260f49d2a502754 100644 (file)
@@ -897,7 +897,7 @@ static void FIO_adjustParamsForPatchFromMode(FIO_prefs_t* const prefs,
     if (fileWindowLog > ZSTD_WINDOWLOG_MAX)
         DISPLAYLEVEL(1, "Max window log exceeded by file (compression ratio will suffer)\n");
     comprParams->windowLog = MIN(ZSTD_WINDOWLOG_MAX, fileWindowLog);
-    if (fileWindowLog > ZSTD_cycleLog(cParams.hashLog, cParams.strategy)) {
+    if (fileWindowLog > ZSTD_cycleLog(cParams.chainLog, cParams.strategy)) {
         if (!prefs->ldmFlag)
             DISPLAYLEVEL(1, "long mode automatically triggered\n");
         FIO_setLdmFlag(prefs, 1);