diff --git a/stepmania/src/RandomSample.cpp b/stepmania/src/RandomSample.cpp index 5bce2e1a09..c57c8776f7 100644 --- a/stepmania/src/RandomSample.cpp +++ b/stepmania/src/RandomSample.cpp @@ -31,13 +31,10 @@ RandomSample::~RandomSample() bool RandomSample::Load( CString sFilePath, int iMaxToLoad ) { - CString sDir, sFName, sExt; - splitrelpath( sFilePath, sDir, sFName, sExt ); - - sExt.MakeLower(); - - if( sExt == "" ) return LoadSoundDir( sFilePath, iMaxToLoad ); - else return LoadSound( sFilePath ); + if( GetExtension(sFilePath) == "" ) + return LoadSoundDir( sFilePath, iMaxToLoad ); + else + return LoadSound( sFilePath ); } void RandomSample::UnloadAll()