Fix for possible memory leak on creation of a vector using Vector.Range.
authorAndrew Hale <TrumanBlending@gmail.com>
Thu, 2 Feb 2012 01:07:04 +0000 (01:07 +0000)
committerAndrew Hale <TrumanBlending@gmail.com>
Thu, 2 Feb 2012 01:07:04 +0000 (01:07 +0000)
commit5a221dd0dea81fbe31f5e6431911288e8e3f4b53
treee445b6b7d370a8d2052cfac1a1dbf3d0db6557d9
parentca927b5771aba924b6f13242b4483e9f861d3153
Fix for possible memory leak on creation of a vector using Vector.Range.
It was possible to allocate an array of size<2 which would then raise an error on vector creation without freeing.

Fix to ensure the behaviour of Vector.Range was the same as for builtin range() function. When specifying 3 arguments, the step argument wasn't being used to correctly calculate the vector size.

Minor formatting edits for error messages.
source/blender/python/mathutils/mathutils_Vector.c