Commit: 7b8e07b7d011fe7245499a267ac967d5787a59e9
Author: Campbell Barton
Date:   Mon Jan 6 14:41:33 2014 +1100
https://developer.blender.org/rB7b8e07b7d011fe7245499a267ac967d5787a59e9

Fix for own error in recent text3d changes

Called important function from within an assert.

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

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

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

diff --git a/source/blender/editors/curve/editfont.c 
b/source/blender/editors/curve/editfont.c
index ef3d7da..9ba7eb3 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1545,6 +1545,7 @@ void make_editText(Object *obedit)
 {
        Curve *cu = obedit->data;
        EditFont *ef = cu->editfont;
+       int len_wchar;
        
        if (ef == NULL) {
                ef = cu->editfont = MEM_callocN(sizeof(EditFont), "editfont");
@@ -1556,8 +1557,9 @@ void make_editText(Object *obedit)
        }
        
        /* Convert the original text to wchar_t */
-       BLI_assert(BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 
4) == cu->len_wchar);  /* length is bogus */
-       ef->len = cu->len_wchar;
+       len_wchar = BLI_strncpy_wchar_from_utf8(ef->textbuf, cu->str, MAXTEXT + 
4);
+       BLI_assert(len_wchar == cu->len_wchar);
+       ef->len = len_wchar;
 
        memcpy(ef->textbufinfo, cu->strinfo, ef->len * sizeof(CharInfo));

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to