From cc8999830a4db5642e2d3cd22edad445d371d11e Mon Sep 17 00:00:00 2001 From: vlovo Date: Tue, 28 Aug 2018 08:38:54 +0200 Subject: [PATCH] fix crash, when selcting previous bookmark on non existent bookmarks --- DebugView++/LogView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DebugView++/LogView.cpp b/DebugView++/LogView.cpp index b37114c6..2c1b6376 100644 --- a/DebugView++/LogView.cpp +++ b/DebugView++/LogView.cpp @@ -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 (m_logLines.size()); do { line += direction;