From 0d7347105fce6cdbd2abbc827c7661a2c063c40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 5 Oct 2020 21:20:47 -0400 Subject: [PATCH] mesa: memset matrices at initialization to enable memcpy on it Reviewed-by: Adam Jackson Part-of: --- src/mesa/math/m_matrix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c index 4653aacdcc8..8a4b27f55bf 100644 --- a/src/mesa/math/m_matrix.c +++ b/src/mesa/math/m_matrix.c @@ -1519,6 +1519,7 @@ _math_matrix_loadf( GLmatrix *mat, const GLfloat *m ) void _math_matrix_ctr( GLmatrix *m ) { + memset(m, 0, sizeof(*m)); memcpy( m->m, Identity, sizeof(Identity) ); memcpy( m->inv, Identity, sizeof(Identity) ); m->type = MATRIX_IDENTITY;