Fixed bug [ 657949 ] Segmentation fault in ~wxFileHistory

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-12-27 14:25:59 +00:00
parent 64725871e0
commit 61de8ba064

View File

@@ -2085,7 +2085,7 @@ void wxFileHistory::Load(wxConfigBase& config)
wxString buf;
buf.Printf(wxT("file%d"), m_fileHistoryN+1);
wxString historyFile;
while ((m_fileHistoryN <= m_fileMaxFiles) && config.Read(buf, &historyFile) && (historyFile != wxT("")))
while ((m_fileHistoryN < m_fileMaxFiles) && config.Read(buf, &historyFile) && (historyFile != wxT("")))
{
m_fileHistory[m_fileHistoryN] = copystring((const wxChar*) historyFile);
m_fileHistoryN ++;