diff options
author | Hans Goudey <h.goudey@me.com> | 2020-04-09 23:29:49 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-04-09 23:29:49 +0300 |
commit | d7273f087dbf351d8520ac974190f5da335be429 (patch) | |
tree | 767feb9af56de5eb8ea51ff8fe60b659867f66e6 /source/blender | |
parent | 054950def946ed7638c2d9c18ef850cbba94d9d7 (diff) |
Fix T75405: Crash when increasing text object bevel depth
One fewer coordinate needs to be calculated when extrusion is zero to
avoid corrupting the end of the memory chunk.
Differential Revision: https://developer.blender.org/D7368
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 5b463059f18..401014e0853 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1877,7 +1877,8 @@ void BKE_curve_bevel_make(Object *ob, ListBase *disp) } /* Don't duplicate the last back vertex. */ angle = (cu->ext1 == 0.0f && (cu->flag & CU_BACK)) ? dangle : 0; - for (a = 0; a < cu->bevresol + 2; a++) { + int front_len = (cu->ext1 == 0.0f) ? cu->bevresol + 1 : cu->bevresol + 2; + for (a = 0; a < front_len; a++) { fp[0] = 0.0; fp[1] = (float)(cosf(angle) * (cu->ext2)); fp[2] = (float)(sinf(angle) * (cu->ext2)) + cu->ext1; |