diff options
author | dx <aryadevchavali1@gmail.com> | 2020-05-06 06:05:39 +0100 |
---|---|---|
committer | dx <aryadevchavali1@gmail.com> | 2020-05-06 06:05:39 +0100 |
commit | 47b3e7b24dd820482ef29511b61fe08b74d7f8ee (patch) | |
tree | 3d1c6c763a8389e7e1d04e5a65bf07a823cc212d /Converter | |
parent | 3ce7811758c351df069ae36c55886af8b577cb66 (diff) | |
download | mdhtml-47b3e7b24dd820482ef29511b61fe08b74d7f8ee.tar.gz mdhtml-47b3e7b24dd820482ef29511b61fe08b74d7f8ee.tar.bz2 mdhtml-47b3e7b24dd820482ef29511b61fe08b74d7f8ee.zip |
+whitespace considerations
Diffstat (limited to 'Converter')
-rw-r--r-- | Converter/src/compiler.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Converter/src/compiler.c b/Converter/src/compiler.c index c6060be..8e45505 100644 --- a/Converter/src/compiler.c +++ b/Converter/src/compiler.c @@ -127,16 +127,15 @@ string compile_line(string line, size_t size_of_line, string line_or_source) // allocate buffer with extra 9 characters for the tags compiled_line = malloc(sizeof(*compiled_line) * - (size_of_line + tag_size + close_tag_size)); + (size_of_line + tag_size + close_tag_size + 3)); // write h1 to start of compiled_line strncpy(compiled_line, tag, tag_size); // write the rest of the line to the compiled_line strncpy(compiled_line + tag_size, line + depth, size_of_line); // write the end tags strncpy(compiled_line + size_of_content + tag_size, close_tag, - close_tag_size); + close_tag_size + 1); } - else { // Assume standard text |