diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-09-15 11:38:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 11:38:37 (GMT) |
commit | 392dff4b2dfe148bb1ad0c0f8a021fc49f764b1e (patch) | |
tree | 96ad99a2a9fa7b161f2d0931dbd4f6e5ffa7c015 /src | |
parent | d1ebd83772b84904e14abd918283cb85787e0d85 (diff) | |
parent | 0a4b995cdd7735aaf42c423eed2889db5b8617ef (diff) | |
download | Doxygen-392dff4b2dfe148bb1ad0c0f8a021fc49f764b1e.zip Doxygen-392dff4b2dfe148bb1ad0c0f8a021fc49f764b1e.tar.gz Doxygen-392dff4b2dfe148bb1ad0c0f8a021fc49f764b1e.tar.bz2 |
Merge pull request #6503 from albert-github/feature/bug_uninitialized_var
Fixing problem with possible not initialized variable (endless loop in VS 2017 debug)
Diffstat (limited to 'src')
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/xmlgen.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index cbfad94..66387bc 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -1633,7 +1633,7 @@ void Definition::writeToc(OutputList &ol, const LocalToc &localToc) int level=1,l; char cs[2]; cs[1]='\0'; - bool inLi[5]={ FALSE, FALSE, FALSE, FALSE }; + bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE }; for (li.toFirst();(si=li.current());++li) { if (si->type==SectionInfo::Section || diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index e68c454..be866a2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1845,7 +1845,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) SDict<SectionInfo>::Iterator li(*sectionDict); SectionInfo *si; int level=1,l; - bool inLi[5]={ FALSE, FALSE, FALSE, FALSE }; + bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE }; int maxLevel = pd->localToc().xmlLevel(); for (li.toFirst();(si=li.current());++li) { @@ -1872,16 +1872,16 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample) if (l <= maxLevel) t << " </tableofcontents>" << endl; } } - if (l <= maxLevel && inLi[nextLevel]) t << " </tocsect>" << endl; if (nextLevel <= maxLevel) { + if (inLi[nextLevel]) t << " </tocsect>" << endl; QCString titleDoc = convertToXML(si->title); t << " <tocsect>" << endl; t << " <name>" << (si->title.isEmpty()?si->label:titleDoc) << "</name>" << endl; t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si -> label) << "</reference>" << endl; + inLi[nextLevel]=TRUE; + level = nextLevel; } - inLi[nextLevel]=TRUE; - level = nextLevel; } } while (level>1 && level <= maxLevel) |