summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 7e5c2a1..edc03d6 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4558,12 +4558,14 @@ namespace pugi
_root->name = 0;
// parse
- xml_parse_result res = impl::load_buffer_impl(doc, _root, const_cast<void*>(contents), size, options, encoding, false, false, &extra->buffer);
+ char_t* buffer = 0;
+ xml_parse_result res = impl::load_buffer_impl(doc, _root, const_cast<void*>(contents), size, options, encoding, false, false, &buffer);
// restore name
_root->name = rootname;
// add extra buffer to the list
+ extra->buffer = buffer;
extra->next = doc->extra_buffers;
doc->extra_buffers = extra;