diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-05-24 17:17:14 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-05-24 17:17:14 +0100 |
| commit | fc0700d1fde9281a459feb6ab0cb0c7873ccdb9a (patch) | |
| tree | 41081fd68fae4dcc8c4605f37d8161cf44160092 /src | |
| parent | b6b646e9a225ef7c780d539d13e382505ff06328 (diff) | |
Fix segfault in region highlighter
Diffstat (limited to 'src')
| -rw-r--r-- | src/highlighters.cc | 4 |
1 files 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<String::const_iterator>; for (RegexIt it{l.begin(), l.end(), regex}, end; it != end; ++it) |
