diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-03-29 08:27:56 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2018-03-29 08:27:56 -0700 |
commit | 951f1ed4ed642faf8b390a5ad910eb840c992553 (patch) | |
tree | 22261c059df58c3d346cf4ffc97053b5be2b40f6 /src | |
parent | cec32da2b5ea03066baff55810f7e8f30960b10d (diff) |
Add a comment to clarify subtle branch in node_copy_tree
Diffstat (limited to 'src')
-rw-r--r-- | src/pugixml.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index bf3346b..d140425 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4423,6 +4423,7 @@ PUGI__NS_BEGIN while (sit && sit != sn) { + // when a tree is copied into one of the descendants, we need to skip that subtree to avoid an infinite loop if (sit != dn) { xml_node_struct* copy = append_new_node(dit, alloc, PUGI__NODETYPE(sit)); |