smu

Simple markup processor
git clone https://git.sinitax.com/codemadness/smu
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 9efd0bcca9728cbf1815f9268e1aa9713702365f
parent c17c953b3a849cff38aa59e0dc4b4f4c2a7a65f1
Author: gottox@rootkit.lan <gottox@rootkit.lan>
Date:   Wed, 12 Dec 2007 01:23:52 +0100

Add missing \0

Diffstat:
Mcmarkdown.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cmarkdown.c b/cmarkdown.c @@ -140,6 +140,7 @@ dolineprefix(const char *begin, const char *end) { continue; if(!(buffer = malloc(end - p+1))) eprint("Malloc failed."); + buffer[0] = '\0'; printf("\n<%s>",lineprefix[i].tag); for(j = 0; p != end; p++, j++) { buffer[j] = *p; @@ -149,6 +150,7 @@ dolineprefix(const char *begin, const char *end) { p += l; } } + buffer[j] = '\0'; if(lineprefix[i].process) process(buffer,buffer+strlen(buffer)); else