Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2006-04-25 03:00:03 +0400
committerKen Hughes <khughes@pacific.edu>2006-04-25 03:00:03 +0400
commit5fa5ea352e1e4bce5070316cdd5d0caef4ac0a23 (patch)
tree12d5ae7dbd013255079bedb4c008aa127ad8ef96 /source/blender/python/api2_2x/matrix.c
parent9e7a0e19875e931220cc459783edcc47f430baeb (diff)
===Bugfix===
matrix.resize4x4() was incorrectly allocating a array of pointers using the wrong cast -- sizeof(float) instead of sizeof(float *). Worked fine on 32-bit systems but caused a crash on AMD64. Discovered by a student in one of my classes (kudos, Joe).
Diffstat (limited to 'source/blender/python/api2_2x/matrix.c')
-rw-r--r--source/blender/python/api2_2x/matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/matrix.c b/source/blender/python/api2_2x/matrix.c
index d3038ddb0bb..e4b678c5008 100644
--- a/source/blender/python/api2_2x/matrix.c
+++ b/source/blender/python/api2_2x/matrix.c
@@ -113,7 +113,7 @@ PyObject *Matrix_Resize4x4(MatrixObject * self)
"matrix.resize4x4(): problem allocating pointer space\n\n");
}
self->contigPtr = self->data.py_data; //force
- self->matrix = PyMem_Realloc(self->matrix, (sizeof(float) * 4));
+ self->matrix = PyMem_Realloc(self->matrix, (sizeof(float *) * 4));
if(self->matrix == NULL) {
return EXPP_ReturnPyObjError(PyExc_MemoryError,
"matrix.resize4x4(): problem allocating pointer space\n\n");