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-15 13:10:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 13:10:51 +0400
commit76ccf2403a0a3784c9a71bf0dd79c07c9f627112 (patch)
tree2e8694090bea4c17d4eeb99f84a036facb12f227
parentdc591a633e73452f0a22d00c23b29453f7c04724 (diff)
correct placement of debug memset() for DEBUG_STRSIZE
-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 a0ab16e24d6..8bc3f6497c3 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -209,15 +209,15 @@ char *BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t
char *BLI_strncat_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy)
{
-#ifdef DEBUG_STRSIZE
- memset(dst, 0xff, sizeof(*dst) * maxncpy);
-#endif
-
while (*dst && maxncpy > 0) {
dst++;
maxncpy--;
}
+#ifdef DEBUG_STRSIZE
+ memset(dst, 0xff, sizeof(*dst) * maxncpy);
+#endif
+
BLI_STR_UTF8_CPY(dst, src, maxncpy);
return dst;