]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
noodle: correct history req calculation
authorJustin Viiret <justin.viiret@intel.com>
Mon, 19 Sep 2016 01:23:37 +0000 (11:23 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Fri, 28 Oct 2016 03:52:48 +0000 (14:52 +1100)
src/hwlm/hwlm_build.cpp
src/scratch.h

index 32de6bd039839646d9292f82fc9f9f650df665a0..3ab10f23dce6d2ab031a5ed5c64cbe42a8de3f51 100644 (file)
@@ -523,7 +523,7 @@ bool isNoodleable(const vector<hwlmLiteral> &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);
index 73a35149f863757059f88aa0cd2ee115688338e1..8c7a12813715e38a0e44aa56e774fb1063940c82 100644 (file)
@@ -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;