Skip to content

Commit ab0ecce

Browse files
committed
Repeat pattern fix : don't raise if multiple parsers without name
1 parent 530b7f2 commit ab0ecce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3029,12 +3029,12 @@ chkNoDupeDotInParserDefs(ln_ctx ctx, struct json_object *parsers)
30293029
if(json_object_get_type(parsers) == json_type_array) {
30303030
const int maxparsers = json_object_array_length(parsers);
30313031
for(int i = 0 ; i < maxparsers ; ++i) {
3032-
++nParsers;
30333032
struct json_object *const parser
30343033
= json_object_array_get_idx(parsers, i);
30353034
struct json_object *fname;
30363035
json_object_object_get_ex(parser, "name", &fname);
30373036
if(fname != NULL) {
3037+
++nParsers;
30383038
if(!strcmp(json_object_get_string(fname), "."))
30393039
++nDots;
30403040
}

0 commit comments

Comments
 (0)