diff --git a/evaluator.cpp b/evaluator.cpp index 9988c6a52..ba042fd97 100644 --- a/evaluator.cpp +++ b/evaluator.cpp @@ -224,11 +224,6 @@ static int eval(std::map const &feature, json_object *f, exit(EXIT_FILTER); } - if (f->value.array.array[0]->type != JSON_STRING) { - fprintf(stderr, "Filter operation is not a string: %s\n", json_stringify(f)); - exit(EXIT_FILTER); - } - // FSL conjunctions if (f->value.array.length == 3 && f->value.array.array[1]->type == JSON_STRING && @@ -292,6 +287,11 @@ static int eval(std::map const &feature, json_object *f, exit(EXIT_IMPOSSIBLE); } + if (f->value.array.array[0]->type != JSON_STRING) { + fprintf(stderr, "Filter operation is not a string: %s\n", json_stringify(f)); + exit(EXIT_FILTER); + } + if (strcmp(f->value.array.array[0]->value.string.string, "has") == 0 || strcmp(f->value.array.array[0]->value.string.string, "!has") == 0) { if (f->value.array.length != 2) {