diff options
Diffstat (limited to 'source/blender/blenlib/intern/string_utf8.c')
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index d435ed8f6e7..225b3c5538f 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -260,7 +260,7 @@ size_t BLI_wstrlen_utf8(const wchar_t *src) return len; } -size_t BLI_strlen_utf8_ex(const char *strc, int *r_len_bytes) +size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) { size_t len; const char *strc_orig = strc; @@ -268,7 +268,7 @@ size_t BLI_strlen_utf8_ex(const char *strc, int *r_len_bytes) for (len = 0; *strc; len++) strc += BLI_str_utf8_size_safe(strc); - *r_len_bytes = (strc - strc_orig); + *r_len_bytes = (size_t)(strc - strc_orig); return len; } @@ -282,7 +282,7 @@ size_t BLI_strlen_utf8(const char *strc) return len; } -size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, int *r_len_bytes) +size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, size_t *r_len_bytes) { size_t len; const char *strc_orig = strc; @@ -292,7 +292,7 @@ size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, int *r_len_byt strc += BLI_str_utf8_size_safe(strc); } - *r_len_bytes = (strc - strc_orig); + *r_len_bytes = (size_t)(strc - strc_orig); return len; } |