forked from bartvdbraak/blender
cu->strinfo reallocation added to Text3d.c, so when setText is executed
the strinfo is reallocated to include strlen(cu->str) amount of free memory
This commit is contained in:
parent
fa57f3115d
commit
83b2d267b5
@ -491,6 +491,8 @@ static PyObject *Text3d_setText( BPy_Text3d * self, PyObject * args )
|
||||
"expected string argument" ) );
|
||||
if( self ) {
|
||||
MEM_freeN( self->curve->str );
|
||||
MEM_freeN(self->curve->strinfo);
|
||||
self->curve->strinfo = MEM_callocN((strlen(text)+1)*sizeof(CharInfo), "strinfo");
|
||||
self->curve->str = MEM_mallocN( strlen (text)+1, "str" );
|
||||
strcpy( self->curve->str, text );
|
||||
self->curve->pos = (short)strlen ( text );
|
||||
|
Loading…
Reference in New Issue
Block a user