commit db99b4f4d4581673adf588710540d4b4923409bf
parent cc9585b6e3472db1402692622dc535413b3fedd9
Author: William Casarin <jb55@jb55.com>
Date: Wed, 3 Apr 2024 12:23:34 -0700
nostrdb: fix dubious looking parens logic
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 &&