Commit 464aeecf authored by marco-buttu's avatar marco-buttu
Browse files

Check baseName

parent 0383eb4c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -154,10 +154,6 @@ protected:
	 * number of schedule lines
	*/
	DWORD m_lines;
	/**
	 * schedule file name (i.e: myschedule.scd)
	 */
	IRA::CString m_scheduleName;
	/**
	 * file name
	 */
+2 −3
Original line number Diff line number Diff line
@@ -96,10 +96,9 @@ bool CParser::parse(CBaseSchedule* unit,DWORD& line,IRA::CString& errorMsg)
//CBaseSchedule

CBaseSchedule::CBaseSchedule(const IRA::CString& path,const IRA::CString& fileName) : m_lines(0), m_fileName(""),
		m_scheduleName(""),m_filePath(path), m_baseName(""),m_lastError(""),m_config(NULL)
		m_filePath(path), m_baseName(""),m_lastError(""),m_config(NULL)
{
	m_parser=new CParser;
	m_scheduleName=fileName;
	m_fileName=m_filePath+fileName;
	int pos=fileName.Find('.');
	m_baseName=fileName.Mid(0,pos);
@@ -113,7 +112,7 @@ CBaseSchedule::~CBaseSchedule()
bool CBaseSchedule::readAll(bool check)
{
	IRA::CString err;
	if (m_scheduleName.GetLength()>MAX_SCHED_NAME_LEN) {
	if (m_baseName.GetLength()>MAX_SCHED_NAME_LEN) {
		m_lastError.Format("Schedule name exceeds the maximum allowed characters of %d",MAX_SCHED_NAME_LEN);
		return false;
	}