Python API bug: Importing ipo curves did a memcpy() on a 1 item too large
data block. I wonder how IpoCurve_append() would have ever worked...
This commit is contained in:
2006-08-20 11:02:31 +00:00
parent b894ee5b87
commit 9334048b60

View File

@@ -498,7 +498,7 @@ static PyObject *IpoCurve_append( C_IpoCurve * self, PyObject * args )
BezTriple *newb = MEM_callocN( (icu->totvert+1)*sizeof(BezTriple),
"BPyBeztriple" );
if( icu->bezt ) {
memcpy( newb, icu->bezt, ( icu->totvert+1 )*sizeof( BezTriple ) );
memcpy( newb, icu->bezt, ( icu->totvert )*sizeof( BezTriple ) );
MEM_freeN( icu->bezt );
}
icu->bezt = newb;