Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-25 10:18:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-25 10:18:26 +0300
commit9df063df19fd7c225518d900f851cdf8ecefd726 (patch)
tree3c5d1ab0f5fb31cf134447041d1bfecc880c93ba
parent820d50d3cbf3a3995ca5a4051c82e8ee24805796 (diff)
Fix assert caused by 38630711a02e553f209ace9a8627a7a851820a2d
-rw-r--r--source/blender/blenlib/intern/string_cursor_utf8.c3
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;