summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-29 20:55:43 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-29 20:55:43 -0700
commitacd11e2766a10236750424453059abb2ab759d1e (patch)
tree8acde75f77c438b8332cbb25fbfade138b38fd92 /src
parent5fcc575ee3a77da65cb63cd43eb4235c851ce6ad (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
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];
}