forked from qt-creator/qt-creator
ProjectExplorer: Fix crash in SanitizerParser
We accessed an invalid iterator. Change-Id: Ib12eeab81b14e5a0a9542161341ea00ac2d1eb0d Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -137,8 +137,8 @@ void SanitizerParser::flush()
|
||||
setDetailsFormat(m_task, m_linkSpecs);
|
||||
static const int maxLen = 50;
|
||||
if (m_task.details.length() > maxLen) {
|
||||
const auto cutOffIt = std::next(m_task.details.begin(), maxLen);
|
||||
m_task.details.insert(cutOffIt, "...");
|
||||
auto cutOffIt = std::next(m_task.details.begin(), maxLen);
|
||||
cutOffIt = m_task.details.insert(cutOffIt, "...");
|
||||
m_task.details.erase(std::next(cutOffIt), std::prev(m_task.details.end()));
|
||||
}
|
||||
scheduleTask(m_task, m_task.details.count());
|
||||
|
Reference in New Issue
Block a user