summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgottox@rootkit.lan <gottox@rootkit.lan>2007-12-13 13:44:42 +0100
committergottox@rootkit.lan <gottox@rootkit.lan>2007-12-13 13:44:42 +0100
commitbce9fd9ebae59863608abd0218422913bd69235a (patch)
tree09a8513955bc06ccab9065ce1337b821c7870678
parentfea415180a6c626081610ed868ef13e2fd874413 (diff)
newline stripping works again
-rw-r--r--cmarkdown.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmarkdown.c b/cmarkdown.c
index 9372430..86134aa 100644
--- a/cmarkdown.c
+++ b/cmarkdown.c
@@ -468,8 +468,8 @@ process(const char *begin, const char *end) {
if(affected)
p += affected;
else {
- for(q = p; *q == '\n' && q != end; q++);
- if(q == end)
+ for(q = p; *q && *q == '\n' && q != end; q++);
+ if(q == end || !*q)
return;
else if(nohtml)
hprint(p,p+1);