diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 41bdce2c04..d17fc74e55 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -184,6 +184,19 @@ unsigned XNode::LoadAttributes( const CString &xml, PARSEINFO *pi, unsigned iOff iEnd = xml.find_first_of( " >", iOffset ); } + if( iEnd == xml.npos ) + { + // error + if( !pi->error_occur ) + { + pi->error_occur = true; + pi->error_pointer = xml; + pi->error_code = PIE_ATTR_NO_VALUE; + pi->error_string = ssprintf( "<%s> attribute text: couldn't find matching quote", sName.c_str() ); + } + return string::npos; + } + bool trim = pi->trim_value; SetString( xml, iOffset, iEnd, &sValue, trim ); iOffset = iEnd;