Commit 6a4b7ed8 by plusvic

Fix issue with external variables

The "scan" method was returning a error when the "externals" dictionary has keys that weren't previously passed to "compile". Ignore those extra keys to avoid regression errors.
parent 79a4b34e
......@@ -1074,7 +1074,14 @@ int process_match_externals(
return ERROR_INVALID_ARGUMENT;
}
if (result != ERROR_SUCCESS)
// yr_rules_define_xxx_variable returns ERROR_INVALID_ARGUMENT if the
// variable wasn't previously defined in the compilation phase. Ignore
// those errors because we don't want the "scan" method being aborted
// because of the "externals" dictionary having more keys than those used
// during compilation.
if (result != ERROR_SUCCESS &&
result != ERROR_INVALID_ARGUMENT)
{
handle_error(result, identifier);
return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment