diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 3731f4c4d..9235f3e5a 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -302,6 +302,7 @@ static PyObject* pybullet_setJointControl(PyObject* self, PyObject* args) len = PySequence_Size(targetValues); numJoints = b3GetNumJoints(sm,bodyIndex); b3SharedMemoryCommandHandle commandHandle; + int qIndex; if (len!=numJoints) { @@ -321,7 +322,7 @@ static PyObject* pybullet_setJointControl(PyObject* self, PyObject* args) commandHandle = b3JointControlCommandInit(sm, bodyIndex,controlMode); - for (int qIndex=0;qIndex