From 60e64bcfa7a0b0b93154e84ab21411c85108a938 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 15 Jul 2013 21:34:48 +0000 Subject: revert part of own commit r58254, utf8 isnt stepping by 1 always so use less-than comparison. --- source/blender/blenlib/intern/string_utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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); } -- cgit v1.2.3