From f600571c6d743e573be2b7966f01f67bcf6b63a1 Mon Sep 17 00:00:00 2001 From: j433866 Date: Wed, 19 Dec 2018 09:42:09 +0000 Subject: [PATCH] Fix to make the filter work when intensive mode was turned on. --- src/core/lib/Magic.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/Magic.mjs b/src/core/lib/Magic.mjs index eeda155..640979c 100644 --- a/src/core/lib/Magic.mjs +++ b/src/core/lib/Magic.mjs @@ -265,6 +265,7 @@ class Magic { * performance) * @param {Object[]} [recipeConfig=[]] - The recipe configuration up to this point * @param {boolean} [useful=false] - Whether the current recipe should be scored highly + * @param {string} [filter=null] - The regex crib provided by the user, to filter the operation output * @returns {Object[]} - A sorted list of the recipes most likely to result in correct decoding */ async speculativeExecution(depth=0, extLang=false, intensive=false, recipeConfig=[], useful=false, filter=null) { @@ -320,7 +321,7 @@ class Magic { await Promise.all(bfEncodings.map(async enc => { const magic = new Magic(enc.data, this.opPatterns), bfResults = await magic.speculativeExecution( - depth-1, extLang, false, [...recipeConfig, enc.conf]); + depth-1, extLang, false, [...recipeConfig, enc.conf], useful, filter); results = results.concat(bfResults); }));