diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-28 08:56:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-28 08:56:41 +0300 |
commit | 8a379e3460048906306042145052d5d7f3bb859c (patch) | |
tree | 015702f457a0265c0194f6443b6c6857054bd90d /source/blender/blenkernel/intern | |
parent | 42e647712937c3a133ee6490ad8606df38ed0365 (diff) |
3D Text: avoid checking null character's text on path
Redundant and causes complications when improving text code.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 0a887dcf676..aed33d2c64d 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1040,7 +1040,7 @@ makebreak: timeofs += distfac * cu->xof; /* not cyclic */ ct = chartransdata; - for (i = 0; i <= slen; i++, ct++) { + for (i = 0; i < slen; i++, ct++) { float ctime, dtime, vec[4], tvec[4], rotvec[3]; float si, co; @@ -1082,8 +1082,9 @@ makebreak: sb = &selboxes[i - selstart]; sb->rot = -ct->rot; } - } + /* null character is always zero width, no need to iterate over it */ + chartransdata[slen] = chartransdata[slen - 1]; } } |