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>2013-07-23 16:49:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 16:49:30 +0400
commit3ff3d1bc0fa6979d0745dbd7526cbb5c35c1fcbf (patch)
tree99df5ec67111abede3cb2e29b469bb7a1ff2b3ae /source/blender/blenlib/intern/string_utf8.c
parenta5bc02194345de1eb21f843b73ce24799677aea1 (diff)
replace use of strcat() where the string offset is known.
also correct bad logic with converting a textblock to 3d-text, bytes-vs-number of chars wasn't handled right.
Diffstat (limited to 'source/blender/blenlib/intern/string_utf8.c')
-rw-r--r--source/blender/blenlib/intern/string_utf8.c8
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;
}