shithub: front

Download patch

ref: 3167f5f7e3d2363ab57a107c838e1c5ef1fcda80
parent: 1d0b9d7088f61fd3e28dada8e8e97abf3eac69f9
author: rodri <rgl@antares-labs.eu>
date: Thu Jul 31 10:37:16 EDT 2025

libgeometry: fix incorrect use of sizeof to size matrices

I missed these two the last time i tried to correct this.

--- a/sys/src/libgeometry/matrix.c
+++ b/sys/src/libgeometry/matrix.c
@@ -7,7 +7,7 @@
 void
 identity(Matrix m)
 {
-	memset(m, 0, sizeof m);
+	memset(m, 0, sizeof(Matrix));
 	m[0][0] = m[1][1] = m[2][2] = 1;
 }
 
@@ -154,7 +154,7 @@
 void
 identity3(Matrix3 m)
 {
-	memset(m, 0, sizeof m);
+	memset(m, 0, sizeof(Matrix3));
 	m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1;
 }
 
--