From b035a11197f69770db5c7ebfb50cb42afc22468d Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 20 Oct 2020 15:39:25 +0200 Subject: Update markdown.cpp Added size check --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 8da908c..fd226f2 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2068,7 +2068,7 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) m_out.addStr("\n"); } } - else // nothing interesting -> just output the line + else if (size>0) // nothing interesting -> just output the line { int tmpSize = size; if (data[size-1] == '\n') tmpSize--; -- cgit v0.12