nostrdb: fix dubious looking parens logic

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-04-03 12:23:34 -07:00
committed by Daniel D’Aquino
parent cc9585b6e3
commit db99b4f4d4

View File

@@ -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 &&