From 70b90a60c70adcf480ce6c67d5f591304f7e7139 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Thu, 25 Aug 2016 17:47:34 +0200 Subject: [PATCH] Fix gcc warning sizeof on array function parameter src will return size of float (*)[3] --- libs/splines/math_matrix.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/splines/math_matrix.h b/libs/splines/math_matrix.h index 41216ee0..a6dabb89 100644 --- a/libs/splines/math_matrix.h +++ b/libs/splines/math_matrix.h @@ -84,7 +84,11 @@ ID_INLINE mat3_t::mat3_t() { } ID_INLINE mat3_t::mat3_t( float src[ 3 ][ 3 ] ) { - memcpy( mat, src, sizeof( src ) ); + for( unsigned int i = 0; i < 3; i++ ) { + mat[i].x = src[i][0]; + mat[i].y = src[i][1]; + mat[i].z = src[i][2]; + } } ID_INLINE mat3_t::mat3_t( idVec3 const &x, idVec3 const &y, idVec3 const &z ) {