diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 13:10:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-15 13:10:51 +0400 |
commit | 76ccf2403a0a3784c9a71bf0dd79c07c9f627112 (patch) | |
tree | 2e8694090bea4c17d4eeb99f84a036facb12f227 /source/blender/blenlib/intern | |
parent | dc591a633e73452f0a22d00c23b29453f7c04724 (diff) |
correct placement of debug memset() for DEBUG_STRSIZE
Diffstat (limited to 'source/blender/blenlib/intern')
-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 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; |