From fc0700d1fde9281a459feb6ab0cb0c7873ccdb9a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 24 May 2014 17:17:14 +0100 Subject: [PATCH] Fix segfault in region highlighter --- src/highlighters.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/highlighters.cc b/src/highlighters.cc index 19d7ac3f..28c208f3 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -805,10 +805,10 @@ private: for (auto& modif : modifs) { for (auto line = std::max(last_line + 1, modif.new_coord.line); - line <= modif.new_coord.line + modif.num_added.line; + line <= modif.new_coord.line + modif.num_added.line and + line < buffer.line_count(); ++line) { - kak_assert(line < buffer.line_count()); auto& l = buffer[line]; using RegexIt = boost::regex_iterator; for (RegexIt it{l.begin(), l.end(), regex}, end; it != end; ++it)