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.
This commit is contained in:
Brecht Van Lommel 2009-12-14 20:01:52 +00:00
parent face5047d0
commit a133e57bf3

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