Commit 26f15654 authored by Allan Anderson's avatar Allan Anderson Committed by Łukasz Wojniłowicz
Browse files

Don't go out of bounds of m_columnList



BUG: 372254
FIXED-IN: 5.0
Signed-off-by: Łukasz Wojniłowicz's avatarŁukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
parent 6728ecde
......@@ -575,7 +575,8 @@ bool BankingPage::processBankLine(const QString &line, MyMoneyStatement &st)
if (m_wiz->m_memoColList[i] != m_colTypeNum[ColumnMemo]) {
if (!memo.isEmpty())
memo.append(QChar(QLatin1Char('\n')));
memo.append(m_columnList[m_wiz->m_memoColList[i]]);
if (m_wiz->m_memoColList[i] < m_columnList.count())
memo.append(m_columnList[m_wiz->m_memoColList[i]]);
}
}
tr.m_strMemo = memo;
......
......@@ -1177,7 +1177,8 @@ bool InvestmentPage::processInvestLine(const QString &line, MyMoneyStatement &st
if (m_wiz->m_memoColList[i] != m_colTypeNum[ColumnMemo]) {
if (!memo.isEmpty())
memo.append(QChar(QLatin1Char('\n')));
memo.append(m_columnList[m_wiz->m_memoColList[i]]);
if (m_wiz->m_memoColList[i] < m_columnList.count())
memo.append(m_columnList[m_wiz->m_memoColList[i]]);
}
}
tr.m_strMemo = memo;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment