Fix use of uninitialised memory.
PiperOrigin-RevId: 534783070 Change-Id: I4fddc983a8ac7213049366d909c57c303ab0e521
This commit is contained in:
committed by
Copybara-Service
parent
03d6d27f64
commit
d82465d710
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user