Add engine-internal convenience macro for allocating typed arrays, improve error message.
PiperOrigin-RevId: 705126655 Change-Id: I2bd8fada6d33a919d2fb82297f93ac57958355a4
This commit is contained in:
committed by
Copybara-Service
parent
3ca97248a3
commit
2691887500
@@ -539,8 +539,8 @@ void mjv_initPerturb(const mjModel* m, mjData* d, const mjvScene* scn, mjvPertur
|
||||
int sel = pert->select;
|
||||
mjtNum headpos[3], forward[3], dif[3];
|
||||
|
||||
mjtNum* jac = mj_stackAllocNum(d, 3*nv);
|
||||
mjtNum* jacM2 = mj_stackAllocNum(d, 3*nv);
|
||||
mjtNum* jac = mjSTACKALLOC(d, 3*nv, mjtNum);
|
||||
mjtNum* jacM2 = mjSTACKALLOC(d, 3*nv, mjtNum);
|
||||
|
||||
// invalid selected body: return
|
||||
if (sel <= 0 || sel >= m->nbody) {
|
||||
|
||||
Reference in New Issue
Block a user