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 08:36:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-25 08:36:40 +0300
commit820d50d3cbf3a3995ca5a4051c82e8ee24805796 (patch)
tree0c62ab95c56a50afc520b76b9d5f926d11ebe438
parent38630711a02e553f209ace9a8627a7a851820a2d (diff)
Correct error in 38630711a02e553f209ace9a8627a7a851820a2d
-rw-r--r--source/blender/blenlib/intern/string_utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 7a01077bb44..cc6a192f6ba 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -678,7 +678,7 @@ size_t BLI_str_utf8_as_utf32(char32_t *__restrict dst_w,
const size_t src_c_len = strlen(src_c);
const char *src_c_end = src_c + src_c_len;
size_t index = 0;
- while (*src_c && len != maxlen) {
+ while ((index < src_c_len) && (len != maxlen)) {
const uint unicode = BLI_str_utf8_as_unicode_step_or_error(src_c, src_c_len, &index);
if (unicode != BLI_UTF8_ERR) {
*dst_w = unicode;