Commit 16fbd061ecf8391d769b43ac6d2c1261f3348955

Martin Mitas 2016-11-21T15:15:41

md_is_inline_link_spec: Fix setting of *p_end.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/md4c/md4c.c b/md4c/md4c.c
index fe1f405..26e6f84 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1789,6 +1789,7 @@ md_is_inline_link_spec(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
     }
     if(CH(off) != _T(')'))
         goto abort;
+    off++;
 
     if(title_contents_beg >= title_contents_end) {
         attr->title = NULL;
@@ -1805,6 +1806,7 @@ md_is_inline_link_spec(MD_CTX* ctx, const MD_LINE* lines, int n_lines,
         attr->title_needs_free = TRUE;
     }
 
+    *p_end = off;
     ret = TRUE;
 
 abort: