From a7e48361499cdf680b798c1b00488acbff648c01 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 25 Feb 2005 06:13:21 +0000 Subject: [PATCH] Skip attribute parsing, to fix errors due to comment contents. --- stepmania/src/XmlFile.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 5815211b5e..4dce32ce70 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -281,14 +281,41 @@ char* XNode::Load( const char* pszXml, PARSEINFO *pi /*= &piDefault*/ ) char* xml = (char*)pszXml; + // < xml = strchr( xml, chXMLTagOpen ); if( xml == NULL ) return NULL; - // Close Tag - if( *(xml+1) == chXMLTagPre ) // " ); + if( pEnd == NULL ) + { + if( !pi->error_occur ) + { + pi->error_occur = true; + pi->error_pointer = xml; + pi->error_code = PIE_ALONE_NOT_CLOSED; + pi->error_string = "Unterminated comment"; + } + + return NULL; + } + + // Skip -->. + xml = pEnd + 3; + + return Load( xml, pi ); + } + // XML Node Tag Name Open xml++; char* pTagEnd = strpbrk( xml, " \t\r\n/>" );