[ODE] Small bug in collision_kernel.cpp

Matthew D. Hancher mdh at email.arc.nasa.gov
Mon Apr 19 11:40:24 MST 2004


> I reported this a long time ago, and I thought they'd fixed it.  Do you have
> the latest version of the source from CVS?

Yup. Definitely not fixed in the current CVS head. And looking at the CVS diffs 
it looks like it never was.

mdh

> 
> -- jm
> 
> > Hey all.  Found another bug, this time in collision_kernel.cpp.  In
> > dGeomSetBody(), in the case where the body is zero, memcpy() is used
> > to copy the Body's position and orientation back into the Geom.  The
> > size arguments should be sizeof(dVector3) and sizeof(dMatrix3), as
> > they are elsewhere, but currently are sizeof(b->pos) and sizeof(b->R).
> > Since the pos and R elements of dxBody are in fact both dReal*, this
> > results in the position and orientation of a Geom not being properly
> > updated when it is detached from a Body.
> >
> > Old: (collision_kernel.cpp:324)
> > <  memcpy (g->pos,g->body->pos,sizeof(g->pos));
> > <  memcpy (g->R,g->body->R,sizeof(g->R));
> > New:
> > >  memcpy (g->pos,g->body->pos,sizeof(dVector3));
> > >  memcpy (g->R,g->body->R,sizeof(dMatrix3));
> >
> >
> 


More information about the ODE mailing list