Skip to content

Commit

Permalink
filter: make sure to return clone errors
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Feb 9, 2024
1 parent f47d74f commit f90c067
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/nostrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,8 +1156,7 @@ static int ndb_filter_group_add(struct ndb_filter_group *group,
if (group->num_filters + 1 > MAX_FILTERS)
return 0;

ndb_filter_clone(&group->filters[group->num_filters++], filter);
return 1;
return ndb_filter_clone(&group->filters[group->num_filters++], filter);
}

static int ndb_filter_group_matches(struct ndb_filter_group *group,
Expand Down

0 comments on commit f90c067

Please sign in to comment.