From f1dba7df2b3075e00cea047a7a2ca96bc43d8255 Mon Sep 17 00:00:00 2001 From: Xavier Mendez Date: Sat, 5 Sep 2015 20:28:28 +0200 Subject: [PATCH] Make find_emph_char detect codespans at the end --- src/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document.c b/src/document.c index 3831b3c3..e2731dab 100644 --- a/src/document.c +++ b/src/document.c @@ -549,7 +549,7 @@ find_emph_char(uint8_t *data, size_t size, uint8_t c) } /* not a well-formed codespan; use found matching emph char */ - if (i >= size) return tmp_i; + if (bt < span_nb && i >= size) return tmp_i; } /* skipping a link */ else if (data[i] == '[') {