nostrdb: fix dubious looking parens logic
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
cc9585b6e3
commit
db99b4f4d4
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user