diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 72701613f7..38ab65ecdc 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -520,7 +520,7 @@ void cmCursesMainForm::FillCacheManagerFromUI() tmpString = (*m_Entries)[i]->m_Entry->GetValue(); // Remove trailing spaces, convert path to unix slashes - string tmpSubString = + std::string tmpSubString = tmpString.substr(0,tmpString.find_last_not_of(" ")+1); if ( entry->m_Type == cmCacheManager::PATH || entry->m_Type == cmCacheManager::FILEPATH )