Skip to content

Commit

Permalink
Bug 723314 - Doxygen crashes on incorrect end group /**< @} */
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Feb 3, 2014
1 parent 0eaf1cd commit b4d5ef1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/scanner.l
Expand Up @@ -5023,6 +5023,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})

tempEntry = current; // temporarily switch to the previous entry
current = previous;
previous = 0;

docBlockContext = SkipCurlyEndDoc;
docBlockInBody = FALSE;
Expand Down Expand Up @@ -5062,7 +5063,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipCurlyEndDoc>"}" {
//addToBody("}");
current = tempEntry;
if (tempEntry) // we can only switch back to current if no new item was created
{
current = tempEntry;
tempEntry = 0;
}
BEGIN( lastCurlyContext );
}
<SkipCurly>\" {
Expand Down Expand Up @@ -6515,7 +6520,14 @@ static void startCommentBlock(bool brief)

static void newEntry()
{
current_root->addSubEntry(current);
if (tempEntry==0) // if temp entry is not 0, it holds current,
// and current is actually replaced by previous which was
// already added to current_root, so we should not add it again
// (see bug723314)
{
current_root->addSubEntry(current);
}
tempEntry = 0;
previous = current;
current = new Entry ;
initEntry();
Expand Down

0 comments on commit b4d5ef1

Please sign in to comment.