summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-03 19:58:26 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-03 19:58:26 (GMT)
commitb4d5ef176eced8315523baea464cfda733ecb9aa (patch)
treeb20abead7abcfcf622d33ca652e6ceceb5646796 /src
parent0eaf1cd5d2eac57666b5ffea9e0f948b7a3e6b3a (diff)
downloadDoxygen-b4d5ef176eced8315523baea464cfda733ecb9aa.zip
Doxygen-b4d5ef176eced8315523baea464cfda733ecb9aa.tar.gz
Doxygen-b4d5ef176eced8315523baea464cfda733ecb9aa.tar.bz2
Bug 723314 - Doxygen crashes on incorrect end group /**< @} */
Diffstat (limited to 'src')
-rw-r--r--src/scanner.l16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/scanner.l b/src/scanner.l
index c854d60..9f163e2 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -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;
@@ -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>\" {
@@ -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();