summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-08-06 18:49:15 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-08-06 18:49:15 (GMT)
commite25977561907befe17844665942a4f7a6e96d321 (patch)
treee5573ce99c635d56993f5f90c2547ea8409d39e2 /src/markdown.cpp
parent69af1c8a96c30da8ac4f1d4a14c3b2fe2ef8e0e9 (diff)
downloadDoxygen-e25977561907befe17844665942a4f7a6e96d321.zip
Doxygen-e25977561907befe17844665942a4f7a6e96d321.tar.gz
Doxygen-e25977561907befe17844665942a4f7a6e96d321.tar.bz2
Bug 705586 - @code tag as the last line of a comment block causes the parser to hang
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 6312733..63d6cfc 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1831,10 +1831,11 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size,
)
{
QCString endBlockName = isBlockCommand(data+end-1,end-1,size-(end-1));
+ end++;
if (!endBlockName.isEmpty())
{
int l = endBlockName.length();
- for (;end<size-l;end++) // search for end of block marker
+ for (;end<size-l-1;end++) // search for end of block marker
{
if ((data[end]=='\\' || data[end]=='@') &&
data[end-1]!='\\' && data[end-1]!='@'
@@ -1858,10 +1859,6 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size,
}
}
}
- else
- {
- end++;
- }
}
else if (nb==0 && data[end-1]=='<' && end<size-6 &&
(end<=1 || (data[end-2]!='\\' && data[end-2]!='@'))