diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-25 10:18:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-25 10:18:26 +0300 |
commit | 9df063df19fd7c225518d900f851cdf8ecefd726 (patch) | |
tree | 3c5d1ab0f5fb31cf134447041d1bfecc880c93ba /source/blender/blenlib/intern/string_cursor_utf8.c | |
parent | 820d50d3cbf3a3995ca5a4051c82e8ee24805796 (diff) |
Fix assert caused by 38630711a02e553f209ace9a8627a7a851820a2d
Diffstat (limited to 'source/blender/blenlib/intern/string_cursor_utf8.c')
-rw-r--r-- | source/blender/blenlib/intern/string_cursor_utf8.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 59b9f4eeca0..f76a3114e09 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -168,6 +168,9 @@ void BLI_str_cursor_step_utf8(const char *str, * list of special character, ctr -> */ while ((*pos) < maxlen) { if (BLI_str_cursor_step_next_utf8(str, maxlen, pos)) { + if (*pos == maxlen) { + break; + } if ((jump != STRCUR_JUMP_ALL) && (delim_type != cursor_delim_type_utf8(str, maxlen, *pos))) { break; |