cap length of Steps m_sDescription to a reasonable value

This commit is contained in:
Chris Danford
2004-08-29 05:01:46 +00:00
parent 2126aa8420
commit 237705ea57
+5
View File
@@ -31,6 +31,8 @@
#include "PrefsManager.h"
#include "NotesLoaderSM.h"
const int MAX_DESCRIPTION_LENGTH = 20;
Steps::Steps()
{
m_StepsType = STEPS_TYPE_INVALID;
@@ -155,6 +157,9 @@ void Steps::TidyUpData()
if( GetMeter() < 1) // meter is invalid
SetMeter( int(PredictMeter()) );
if( m_sDescription.size() > MAX_DESCRIPTION_LENGTH )
m_sDescription = m_sDescription.Left( MAX_DESCRIPTION_LENGTH );
}
void Steps::Decompress() const