Re: Bug in tritri.cpp
Christian Van Brussel <[email protected]> Thu, 16 Jan 2014 17:54:16 +0100
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Organization | UCL - TELE |
| Message-ID | <1389891256.2363.78.camel@scylla> |
On Sat, 2014-01-11 at 20:45 -0800, Ralph Campbell wrote: > Coverity found an obvious bug in HandlePointsInTriangle() > in libs/csgeom/tritri.cpp but I'm not sure what the fix is. > > It accesses tri2[2] but clearly declares tri2[2]. Hi, The methods involved are manipulating triangles, that is arrays of 3 vectors, not 2. Accessing tri2[2] is therefore OK but it is a priori designed to be defined as tri2[3]. I fixed the problem in r39976, and looking at that I found another problem in the coplanar case, it was missing an iteration on the second triangle, see r39977. ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk