Fix T58975: "@=" operator silently fails
authorCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2018 22:46:34 +0000 (09:46 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2018 22:49:00 +0000 (09:49 +1100)
D4083 by @artfunkel

source/blender/python/mathutils/mathutils_Matrix.c

index d9319f1ae7c851f92ccf6bffb453e5a9bde4329b..76921b69d1a05dfe6b47dd02cfdfea718732284f 100644 (file)
@@ -2550,7 +2550,7 @@ static PyObject *Matrix_imatmul(PyObject *m1, PyObject *m2)
                }
 
                /* copy matrix back */
-               memcpy(mat1->matrix, mat, mat1->num_row * mat1->num_col);
+               memcpy(mat1->matrix, mat, (mat1->num_row * mat1->num_col) * sizeof(float));
        }
        else {
                PyErr_Format(PyExc_TypeError,