From acd11e2766a10236750424453059abb2ab759d1e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 29 Mar 2015 20:55:43 -0700 Subject: Fixed bug in cmark_strbuf_unescape (buffer.c). The old function called 'continue' when seeing a backslash, but this gave incorrect results on input like: \\* since the next backslash would be treated as escaping the `*` instead of being escaped itself. --- src/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 0df6561..5ec8b49 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -372,7 +372,7 @@ extern void cmark_strbuf_unescape(cmark_strbuf *buf) for (r = 0, w = 0; r < buf->size; ++r) { if (buf->ptr[r] == '\\' && cmark_ispunct(buf->ptr[r + 1])) - continue; + r++; buf->ptr[w++] = buf->ptr[r]; } -- cgit v1.2.3