diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-07-02 21:14:01 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-07-05 12:10:06 +0100 |
| commit | ed68d1ff287d43c5293abb4d41e908aa8e50afec (patch) | |
| tree | b5ab042ba67259a63b2aa0ae99ad74a5bc646a7f /src/buffer_utils.cc | |
| parent | 3f70d91f8c716ef2dbc76abb9c878f86ecb946f7 (diff) | |
utf8: use end of sequence iterators for more security
Diffstat (limited to 'src/buffer_utils.cc')
| -rw-r--r-- | src/buffer_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer_utils.cc b/src/buffer_utils.cc index c59157a5..5eeb188f 100644 --- a/src/buffer_utils.cc +++ b/src/buffer_utils.cc @@ -14,7 +14,7 @@ CharCount get_column(const Buffer& buffer, auto col = 0_char; for (auto it = line.begin(); it != line.end() and coord.column > (int)(it - line.begin()); - it = utf8::next(it)) + it = utf8::next(it, line.end())) { if (*it == '\t') col = (col / tabstop + 1) * tabstop; |
