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/>" );