diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 39e07f1..af33ef8 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -6066,7 +6066,7 @@ namespace pugi impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return false; - for (xml_attribute_struct* attr = _root->first_attribute; attr;) + for (xml_attribute_struct* attr = _root->first_attribute; attr; ) { xml_attribute_struct* next = attr->next_attribute; @@ -6109,7 +6109,7 @@ namespace pugi { xml_node_struct* next = child->next_sibling; - destroy_node(child, alloc); + impl::destroy_node(child, alloc); child = next; } diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp index d2f1a3c..319555a 100644 --- a/tests/test_dom_modify.cpp +++ b/tests/test_dom_modify.cpp @@ -505,6 +505,23 @@ TEST_XML(dom_node_remove_attributes, "") { CHECK(doc.child(STR("node")).remove_child(STR("n1")));