commit 46028086d19af707d05155baa25e0fd199df33cc
parent 4003b54bf3a2151f5a75e1cecc515493745016a3
Author: William Casarin <jb55@jb55.com>
Date: Wed, 3 Apr 2024 12:23:34 -0700
fix dubious looking parens logic
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content_parser.c b/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 &&