Skip to content

Commit

Permalink
fix crash, when selcting previous bookmark on non existent bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
vlovo committed Aug 28, 2018
1 parent 9ae4170 commit cc89998
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DebugView++/LogView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1627,13 +1627,13 @@ int CLogView::FindLine(Predicate pred, int direction) const
SetCursor(::LoadCursor(nullptr, IDC_ARROW));
Win32::ScopedCursor cursor(::LoadCursor(nullptr, IDC_WAIT));

size_t begin = std::max(GetNextItem(-1, LVNI_FOCUSED), 0);
size_t line = begin;
int begin = std::max(GetNextItem(-1, LVNI_FOCUSED), 0);
int line = begin;

if (m_logLines.empty())
return -1;

auto size = m_logLines.size();
auto size = static_cast<int> (m_logLines.size());
do
{
line += direction;
Expand Down

0 comments on commit cc89998

Please sign in to comment.