Fix use of uninitialised memory.

PiperOrigin-RevId: 534783070
Change-Id: I4fddc983a8ac7213049366d909c57c303ab0e521
This commit is contained in:
Yuval Tassa
2023-05-24 04:39:16 -07:00
committed by Copybara-Service
parent 03d6d27f64
commit d82465d710
+1
View File
@@ -716,6 +716,7 @@ static void addJTBJSparse(const mjModel* m, mjData* d, const mjtNum* J,
// allocate row
mjMARKSTACK;
mjtNum* row = mj_stackAlloc(d, nv);
mju_zero(row, nv);
// process non-zero elements of B
for (int i=0; i<n; i++) {