nostrdb/filter: don't end field if we don't have one active
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
1a6568deca
commit
05c5a6dacb
@@ -904,6 +904,10 @@ void ndb_filter_end_field(struct ndb_filter *filter)
|
|||||||
struct ndb_filter_elements *cur;
|
struct ndb_filter_elements *cur;
|
||||||
|
|
||||||
cur = filter->current;
|
cur = filter->current;
|
||||||
|
|
||||||
|
if (cur == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
filter->elements[filter->num_elements++] = cur;
|
filter->elements[filter->num_elements++] = cur;
|
||||||
|
|
||||||
// sort elements for binary search
|
// sort elements for binary search
|
||||||
|
|||||||
Reference in New Issue
Block a user