summaryrefslogtreecommitdiff
path: root/src/insert_completer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-07-02 21:14:01 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-07-05 12:10:06 +0100
commited68d1ff287d43c5293abb4d41e908aa8e50afec (patch)
treeb5ab042ba67259a63b2aa0ae99ad74a5bc646a7f /src/insert_completer.cc
parent3f70d91f8c716ef2dbc76abb9c878f86ecb946f7 (diff)
utf8: use end of sequence iterators for more security
Diffstat (limited to 'src/insert_completer.cc')
-rw-r--r--src/insert_completer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc
index aab807f1..2acc5447 100644
--- a/src/insert_completer.cc
+++ b/src/insert_completer.cc
@@ -32,7 +32,7 @@ template<bool other_buffers>
InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos)
{
auto pos = buffer.iterator_at(cursor_pos);
- if (pos == buffer.begin() or not is_word(*utf8::previous(pos)))
+ if (pos == buffer.begin() or not is_word(*utf8::previous(pos, buffer.begin())))
return {};
auto end = buffer.iterator_at(cursor_pos);