Bail out earlier when dealing with certain types of malformed DWI charts.

This commit is contained in:
Michael Votaw
2025-05-10 09:22:01 -07:00
committed by teejusb
parent 398a7062ea
commit 977f83a16f
+8 -1
View File
@@ -436,7 +436,14 @@ static bool LoadFromDWITokens(
const RString &sPath )
{
CHECKPOINT_M( "DWILoader::LoadFromDWITokens()" );
if (sStepData1.size() < 2 && sStepData2.size() < 2)
{
// If there's no step data to load for this chart, bail out here, instead of letting
// SetNoteData() throw an assertion.
LOG->Warn("Song file \"%s\" has malformed chart data for chart %s:%s:%s. Skipping chart.", sPath.c_str(), sMode.c_str(), sDescription.c_str(), sNumFeet.c_str());
return false;
}
out.m_StepsType = GetTypeFromMode(sMode);
// if the meter is empty, force it to 1.