aboutsummaryrefslogtreecommitdiff
path: root/Converter/src
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-05-20 15:41:00 +0100
committerdx <aryadevchavali1@gmail.com>2020-05-20 15:41:00 +0100
commit1a70a39f9d23a2b4ef29e6c39034eb408ddff273 (patch)
tree7dbd1f762e8bc7879e6dd7502e0388526a44a0ac /Converter/src
parent6e06b3c54b1b317a9cf4fe97c8b473c97d2a2acb (diff)
downloadmdhtml-1a70a39f9d23a2b4ef29e6c39034eb408ddff273.tar.gz
mdhtml-1a70a39f9d23a2b4ef29e6c39034eb408ddff273.tar.bz2
mdhtml-1a70a39f9d23a2b4ef29e6c39034eb408ddff273.zip
+test case for an empty tag
Diffstat (limited to 'Converter/src')
-rw-r--r--Converter/src/compiler.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Converter/src/compiler.c b/Converter/src/compiler.c
index 2fb5607..e2dd74b 100644
--- a/Converter/src/compiler.c
+++ b/Converter/src/compiler.c
@@ -95,6 +95,11 @@ void compile_inner_text(string dest, string src, size_t sz_src,
break;
}
+ if (src[i + md_tag_size] == '\0')
+ {
+ strncpy(dest, src + i, md_tag_size);
+ break;
+ }
// find the corresponding markdown tag, and report errors
j = find_string(src + i + md_tag_size, md_tag, sz_src - i - md_tag_size,
md_tag_size);