Added note about checking dwi chart length of at least 2 characters
This commit is contained in:
@@ -437,10 +437,12 @@ static bool LoadFromDWITokens(
|
||||
{
|
||||
CHECKPOINT_M( "DWILoader::LoadFromDWITokens()" );
|
||||
|
||||
// If there's no step data to load for this chart, bail out here, instead of letting
|
||||
// SetNoteData() throw an assertion.
|
||||
// If the step data isn't at least 2 characters long, ParseNoteData() runs the risk
|
||||
// of trying to read past the end of the string.
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user