Tighter bound for triggering invalid condim in mj_collideGeoms.

PiperOrigin-RevId: 469210244
Change-Id: I349de59aac7ba1bc80df322f667fa9afc87d4b1f
This commit is contained in:
Yuval Tassa
2022-08-22 09:49:59 -07:00
committed by Copybara-Service
parent 8ca5887c20
commit 558aaf2923
+1 -1
View File
@@ -725,7 +725,7 @@ void mj_collideGeoms(const mjModel* m, mjData* d, int g1, int g2, int flg_user,
// add contact returned by collision detector
for (i=0; i<num; i++) {
// set contact data
if (condim > 6 || condim < 0) { // SHOULD NOT OCCUR
if (condim > 6 || condim < 1) { // SHOULD NOT OCCUR
mju_error_i("Invalid condim value: %d", i);
}
con[i].dim = condim;