commit 33c47407d9057fafd1dcdfa5fbd88eff0b524b0b
parent d30774796355cf8324d5857ee6601f5d98ba7252
Author: William Casarin <jb55@jb55.com>
Date: Mon, 8 Jan 2024 14:29:44 -0800
filter: don't end field if we don't have one active
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/nostrdb.c b/src/nostrdb.c
@@ -904,6 +904,10 @@ void ndb_filter_end_field(struct ndb_filter *filter)
struct ndb_filter_elements *cur;
cur = filter->current;
+
+ if (cur == NULL)
+ return;
+
filter->elements[filter->num_elements++] = cur;
// sort elements for binary search