mesa: fix _math_matrix_copy(), again
authorBrian Paul <brianp@vmware.com>
Mon, 30 Jul 2012 14:29:08 +0000 (08:29 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 30 Jul 2012 14:30:15 +0000 (08:30 -0600)
The matrix is 16 GLfloats in size.  Since from->inv is just a pointer (not
an array), sizeof(*from->inv) wasn't right.

src/mesa/math/m_matrix.c

index 7c4e9fdcbd6c286aa2e2b8bb1184dcd62d2e6ab3..00a6c814fe33c88f20bf1ebca86462fe673057b7 100644 (file)
@@ -1437,7 +1437,7 @@ void
 _math_matrix_copy( GLmatrix *to, const GLmatrix *from )
 {
    memcpy( to->m, from->m, sizeof(Identity) );
-   memcpy(to->inv, from->inv, sizeof(*from->inv));
+   memcpy(to->inv, from->inv, 16 * sizeof(GLfloat));
    to->flags = from->flags;
    to->type = from->type;
 }