diff --git a/stepmania/src/IniFile.cpp b/stepmania/src/IniFile.cpp index a8962e689a..7330b494b8 100644 --- a/stepmania/src/IniFile.cpp +++ b/stepmania/src/IniFile.cpp @@ -95,7 +95,14 @@ bool IniFile::WriteFile( RageFileBasic &f ) const FOREACH_CONST_Attr( pKey, pAttr ) { - if( f.PutLine( ssprintf("%s=%s", pAttr->first.c_str(), pAttr->second.c_str()) ) == -1 ) + const RString &sName = pAttr->first; + const RString &sValue = pAttr->second; + + // TODO: Are there esacpe rules for these? + DEBUG_ASSERT( sName.find('\n') == sName.npos ); + DEBUG_ASSERT( sName.find('=') == sName.npos ); + + if( f.PutLine( ssprintf("%s=%s", sName.c_str(), sValue.c_str()) ) == -1 ) { m_sError = f.GetError(); return false;