fix crash when reading 14 key BMS data
This commit is contained in:
@@ -53,8 +53,7 @@ static int iTracks[MAX_NOTE_TRACKS];
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
BMS_NULL_COLUMN = 0,
|
BMS_P1_KEY1 = 0,
|
||||||
BMS_P1_KEY1,
|
|
||||||
BMS_P1_KEY2,
|
BMS_P1_KEY2,
|
||||||
BMS_P1_KEY3,
|
BMS_P1_KEY3,
|
||||||
BMS_P1_KEY4,
|
BMS_P1_KEY4,
|
||||||
@@ -111,8 +110,7 @@ StepsType BMSLoader::CheckTracksMagic()
|
|||||||
return STEPS_TYPE_DANCE_SOLO;
|
return STEPS_TYPE_DANCE_SOLO;
|
||||||
case 8:
|
case 8:
|
||||||
// Could also be couple or 7-key.
|
// Could also be couple or 7-key.
|
||||||
if (iTracks[7] == 0 && iTracks[8] == 0 && iTracks[1] == 0 && iTracks[3] ==
|
if (iTracks[7] == 0 && iTracks[8] == 0 && iTracks[1] == 0 && iTracks[3] == 0)
|
||||||
0)
|
|
||||||
// these four tracks are IIDX-related
|
// these four tracks are IIDX-related
|
||||||
return STEPS_TYPE_DANCE_DOUBLE;
|
return STEPS_TYPE_DANCE_DOUBLE;
|
||||||
else
|
else
|
||||||
@@ -437,6 +435,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out )
|
|||||||
void BMSLoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
void BMSLoader::GetApplicableFiles( CString sPath, CStringArray &out )
|
||||||
{
|
{
|
||||||
GetDirListing( sPath + CString("*.bms"), out );
|
GetDirListing( sPath + CString("*.bms"), out );
|
||||||
|
GetDirListing( sPath + CString("*.bme"), out );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||||
|
|||||||
Reference in New Issue
Block a user