From efee7df3f43c01504b4dd7c86f9ec72bcf318f05 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 21 Apr 2010 06:48:32 +0000 Subject: Fixed invalid document contents when document parsing fails git-svn-id: http://pugixml.googlecode.com/svn/trunk@282 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index f24653f..1bd6c68 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -3063,8 +3063,7 @@ namespace pugi { xml_parse_result res = parse(xmlstr, options); - if (res) _buffer = xmlstr; - else global_deallocate(xmlstr); + _buffer = xmlstr; return res; } -- cgit v1.2.3