From 98c791dc6e6c55c402aa8d41b62564ed51b6a681 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Mon, 19 Sep 2016 11:23:37 +1000 Subject: [PATCH] noodle: correct history req calculation --- src/hwlm/hwlm_build.cpp | 2 +- src/scratch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hwlm/hwlm_build.cpp b/src/hwlm/hwlm_build.cpp index 32de6bd0..3ab10f23 100644 --- a/src/hwlm/hwlm_build.cpp +++ b/src/hwlm/hwlm_build.cpp @@ -523,7 +523,7 @@ bool isNoodleable(const vector &lits, } if (stream_control) { // nullptr if in block mode - if (lits.front().s.length() + 1 > stream_control->history_max) { + if (lits.front().s.length() > stream_control->history_max + 1) { DEBUG_PRINTF("length of %zu too long for history max %zu\n", lits.front().s.length(), stream_control->history_max); diff --git a/src/scratch.h b/src/scratch.h index 73a35149..8c7a1281 100644 --- a/src/scratch.h +++ b/src/scratch.h @@ -45,7 +45,7 @@ extern "C" #endif UNUSED static const u32 SCRATCH_MAGIC = 0x544F4259; -#define FDR_TEMP_BUF_SIZE 220 +#define FDR_TEMP_BUF_SIZE 222 struct fatbit; struct hs_scratch;