Skip to content
Snippets Groups Projects
Commit 1dd6004a authored by andy's avatar andy
Browse files

BUG: changeDictionary - new dictionary entry index was not being incremented

parent fe068c3b
Branches
Tags
No related merge requests found
......@@ -419,6 +419,7 @@ int main(int argc, char *argv[])
wordList doneKeys(dictList.size());
label nEntries = fieldDict.size();
forAll(dictList, i)
{
doneKeys[i] = dictList[i].keyword();
......@@ -434,12 +435,13 @@ int main(int argc, char *argv[])
);
fieldDict.remove(doneKeys[i]);
}
// Add remaining entries
label sz = dictList.size();
dictList.setSize(nEntries);
forAllConstIter(dictionary, fieldDict, iter)
{
dictList.set(sz, iter().clone());
dictList.set(sz++, iter().clone());
}
Info<< "Writing modified fieldDict " << fieldName << endl;
......
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