mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 04:21:01 +08:00
8cece4b9fe
Previously when copying the allocator state we would copy an incorrect root pointer into the document's current state; while this had a minimal impact on the allocation state due to the fact that any new allocation would need to create a new page, this used a potentially stale field of the moved document when setting up new pages, which could create issues in future uses of the pages. This change fixes the core problem and also removes the use of the _root->allocator from allocate_page since it's not clear why we need it there in the first place.