Fix text edit-mode character info initialization

Using EditFont.pos before it was set.
This commit is contained in:
Campbell Barton 2019-10-09 13:52:30 +11:00
parent 7468227aea
commit 8f210f0475
1 changed files with 1 additions and 1 deletions

View File

@ -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;