diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-16 01:34:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-16 01:34:48 +0400 |
commit | 60e64bcfa7a0b0b93154e84ab21411c85108a938 (patch) | |
tree | 50f401a74513974561e3a0fff8a2c07f4eea3d26 /source/blender/blenlib | |
parent | 28a27e2e9d7f6f75d5e68c2b890e35a62bc3f0ad (diff) |
revert part of own commit r58254, utf8 isnt stepping by 1 always so use less-than comparison.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/string_utf8.c | 2 |
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 8bc3f6497c3..d435ed8f6e7 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -239,7 +239,7 @@ size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst, const wchar_t *__restrict memset(dst, 0xff, sizeof(*dst) * maxncpy); #endif - while (*src && len != maxlen) { /* XXX can still run over the buffer because utf8 size isn't known :| */ + while (*src && len < maxlen) { /* XXX can still run over the buffer because utf8 size isn't known :| */ len += BLI_str_utf8_from_unicode((unsigned int)*src++, dst + len); } |