Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72001 - trunk/boost/property_tree/detail
From: sebastian.redl_at_[hidden]
Date: 2011-05-16 17:34:16


Author: cornedbee
Date: 2011-05-16 17:34:15 EDT (Mon, 16 May 2011)
New Revision: 72001
URL: http://svn.boost.org/trac/boost/changeset/72001

Log:
Allow nuls in PTree XML. See bug 5259.
Text files modified:
   trunk/boost/property_tree/detail/xml_parser_read_rapidxml.hpp | 9 ++++++---
   1 files changed, 6 insertions(+), 3 deletions(-)

Modified: trunk/boost/property_tree/detail/xml_parser_read_rapidxml.hpp
==============================================================================
--- trunk/boost/property_tree/detail/xml_parser_read_rapidxml.hpp (original)
+++ trunk/boost/property_tree/detail/xml_parser_read_rapidxml.hpp 2011-05-16 17:34:15 EDT (Mon, 16 May 2011)
@@ -44,7 +44,8 @@
                     {
                         Ptree &pt_attr = pt_attr_root.push_back(
                             std::make_pair(attr->name(), Ptree()))->second;
- pt_attr.data() = attr->value();
+ pt_attr.data() = std::basic_string<Ch>(attr->value(),
+ attr->value_size());
                     }
                 }
 
@@ -63,7 +64,8 @@
                     pt.push_back(std::make_pair(xmltext<Ch>(),
                                                 Ptree(node->value())));
                 else
- pt.data() += node->value();
+ pt.data() += std::basic_string<Ch>(node->value(),
+ node->value_size());
             }
             break;
 
@@ -72,7 +74,8 @@
             {
                 if (!(flags & no_comments))
                     pt.push_back(std::make_pair(xmlcomment<Ch>(),
- Ptree(node->value())));
+ Ptree(std::basic_string<Ch>(node->value(),
+ node->value_size()))));
             }
             break;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk