a check to verify the index is valid (different from -1)
Quote
...
void CSearchListCtrl::UpdateSearch(CSearchFile* toupdate)
{
...
int index = FindItem(&find);
{
Update(index);
}
}
...
void CSearchListCtrl::UpdateSearch(CSearchFile* toupdate)
{
...
int index = FindItem(&find);
{
Update(index);
}
}
...
the fix
Quote
...
void CSearchListCtrl::UpdateSearch(CSearchFile* toupdate)
{
...
int index = FindItem(&find);
if (index != -1) // Avi3k: fix index check
{
Update(index);
}
}
...
void CSearchListCtrl::UpdateSearch(CSearchFile* toupdate)
{
...
int index = FindItem(&find);
if (index != -1) // Avi3k: fix index check
{
Update(index);
}
}
...
Avi3k
This post has been edited by Avi-3k: 05 October 2005 - 10:04 AM