[Bf-blender-cvs] [8f210f04758] master: Fix text edit-mode character info initialization
Campbell Barton
noreply at git.blender.org
Wed Oct 9 04:56:21 CEST 2019
Commit: 8f210f04758f1c81b757eca0e707f60267de0f19
Author: Campbell Barton
Date: Wed Oct 9 13:52:30 2019 +1100
Branches: master
https://developer.blender.org/rB8f210f04758f1c81b757eca0e707f60267de0f19
Fix text edit-mode character info initialization
Using EditFont.pos before it was set.
===================================================================
M source/blender/editors/curve/editfont.c
===================================================================
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 603b0967ace..e11807d818f 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1876,6 +1876,7 @@ void ED_curve_editfont_make(Object *obedit)
memcpy(ef->textbufinfo, cu->strinfo, ef->len * sizeof(CharInfo));
+ ef->pos = cu->pos;
if (ef->pos > ef->len) {
ef->pos = ef->len;
}
@@ -1883,7 +1884,6 @@ void ED_curve_editfont_make(Object *obedit)
cu->curinfo = ef->textbufinfo[ef->pos ? ef->pos - 1 : 0];
/* Other vars */
- ef->pos = cu->pos;
ef->selstart = cu->selstart;
ef->selend = cu->selend;
More information about the Bf-blender-cvs
mailing list