diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 23:01:52 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-14 23:01:52 +0300 |
commit | a133e57bf36d1eef70442ada71baac68770b780e (patch) | |
tree | b888bfda8bf877e788af7e460b8aa3e30d432840 /source | |
parent | face5047d0d2f36018bd32541501fc0263b40086 (diff) |
Fix #20233: crash when entering - characters in text object, with short
textbox width. I can't tell if this is working correct, the code is very
cryptic, with gotos even, but seems there is not enough space allocated
to permit splitting each character to it's own line.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index e2dccf02b40..1a63f97e310 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -705,10 +705,10 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) /* We assume the worst case: 1 character per line (is freed at end anyway) */ - linedata= MEM_mallocN(sizeof(float)*(slen+2),"buildtext2"); - linedata2= MEM_mallocN(sizeof(float)*(slen+2),"buildtext3"); - linedata3= MEM_callocN(sizeof(float)*(slen+2),"buildtext4"); - linedata4= MEM_callocN(sizeof(float)*(slen+2),"buildtext5"); + linedata= MEM_mallocN(sizeof(float)*(slen*2 + 1),"buildtext2"); + linedata2= MEM_mallocN(sizeof(float)*(slen*2 + 1),"buildtext3"); + linedata3= MEM_callocN(sizeof(float)*(slen*2 + 1),"buildtext4"); + linedata4= MEM_callocN(sizeof(float)*(slen*2 + 1),"buildtext5"); linedist= cu->linedist; |