From db335a813fa9fd854808014295709500694afcbf Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 4 Oct 2006 23:06:46 +0000 Subject: [PATCH] fix double-free --- stepmania/src/XmlFile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index db914ebbe3..99f282329c 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -14,9 +14,10 @@ #include "Foreach.h" XNode::XNode( const XNode &cpy ): - m_Value( cpy.m_Value ), - m_attrs( cpy.m_attrs ) + m_Value( cpy.m_Value ) { + FOREACH_CONST_Attr( &cpy, pAttr ) + this->AppendAttr( pAttr->first, new XNodeValue(*pAttr->second) ); FOREACH_CONST_Child( &cpy, c ) this->AppendChild( new XNode(*c) ); }