Skip to content
Snippets Groups Projects
Commit 343a3b95 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: guard against non-dictionary entries in changeDictionary (#1092)

parent 85ffe4c6
Branches
Tags
No related merge requests found
......@@ -99,6 +99,11 @@ HashTable<wordList> extractPatchGroups(const dictionary& boundaryDict)
for (const entry& dEntry : boundaryDict)
{
if (!dEntry.isDict())
{
continue;
}
const word& patchName = dEntry.keyword();
const dictionary& patchDict = dEntry.dict();
......@@ -552,7 +557,10 @@ int main(int argc, char *argv[])
dictionary fieldDict;
for (const entry& e : dictList)
{
fieldDict.add(e.keyword(), e.dict());
if (e.isDict())
{
fieldDict.add(e.keyword(), e.dict());
}
}
if (dictList.size())
......@@ -584,6 +592,12 @@ int main(int argc, char *argv[])
for (const entry& replaceEntry : replaceDicts)
{
if (!replaceEntry.isDict())
{
// Could also warn
continue;
}
const word& fieldName = replaceEntry.keyword();
const dictionary& replaceDict = replaceEntry.dict();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment