Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-06 07:41:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-06 07:41:33 +0400
commit7b8e07b7d011fe7245499a267ac967d5787a59e9 (patch)
tree64ae337953ffe9da29f2620a598a897574a0aa91 /source/blender/editors/curve
parent64fc94e93f13c38fdf25d9ac3a13e08811d055d9 (diff)
Fix for own error in recent text3d changes
Called important function from within an assert.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editfont.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index ef3d7dae14c..9ba7eb3cd20 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));