[Bf-blender-cvs] [9a3855e] master: Text3d: remove redundant call to wcslen

Campbell Barton noreply at git.blender.org
Sun Dec 29 11:06:43 CET 2013


Commit: 9a3855e6554be195ea5cbae7eb23a8c56f39e1cb
Author: Campbell Barton
Date:   Sun Dec 29 21:04:54 2013 +1100
https://developer.blender.org/rB9a3855e6554be195ea5cbae7eb23a8c56f39e1cb

Text3d: remove redundant call to wcslen

===================================================================

M	source/blender/editors/curve/editfont.c

===================================================================

diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 795dfc9..c89f79b 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1430,9 +1430,7 @@ void make_editText(Object *obedit)
 	}
 	
 	/* Convert the original text to wchar_t */
-	BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */
-
-	cu->len = wcslen(ef->textbuf);
+	cu->len = BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 4); /* length is bogus */
 
 	memcpy(ef->textbufinfo, cu->strinfo, (cu->len) * sizeof(CharInfo));




More information about the Bf-blender-cvs mailing list