From dffe8cf029201df9e60fabccb6cd496d46cd77ae Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 24 Apr 2004 21:01:32 +0000 Subject: [PATCH] fix reverting in the editor goes to the wrong song if the selected song has a blank description --- stepmania/src/StepsUtil.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/StepsUtil.cpp b/stepmania/src/StepsUtil.cpp index 30eebb8fd6..c78b959893 100644 --- a/stepmania/src/StepsUtil.cpp +++ b/stepmania/src/StepsUtil.cpp @@ -150,11 +150,14 @@ void StepsID::FromSteps( const Steps *p ) * to have access to Song::m_LoadedFromProfile. */ Steps *StepsID::ToSteps( const Song *p, bool bAllowNull ) const { - if( st == STEPS_TYPE_INVALID || dc == DIFFICULTY_INVALID || sDescription.empty() ) + if( st == STEPS_TYPE_INVALID || dc == DIFFICULTY_INVALID ) return NULL; vector vNotes; - p->GetSteps( vNotes, st, dc, -1, -1, sDescription, true ); + if( dc == DIFFICULTY_EDIT ) + p->GetSteps( vNotes, st, dc, -1, -1, sDescription, true ); + else + p->GetSteps( vNotes, st, dc, -1, -1, "", true ); if( !vNotes.empty() ) return vNotes[0]; if( bAllowNull )