From db99b4f4d4581673adf588710540d4b4923409bf Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 3 Apr 2024 12:23:34 -0700 Subject: [PATCH] nostrdb: fix dubious looking parens logic Signed-off-by: William Casarin --- nostrdb/src/content_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostrdb/src/content_parser.c b/nostrdb/src/content_parser.c index 7767a727..9243ff8a 100644 --- a/nostrdb/src/content_parser.c +++ b/nostrdb/src/content_parser.c @@ -423,7 +423,7 @@ static int parse_url(struct cursor *cur, struct ndb_block *block) { } // smart parens - if (start - 1 >= 0 && + if ((start - 1) >= cur->start && start < cur->end && *(start - 1) == '(' && (cur->p - 1) < cur->end &&