Menu

#152 Bug in FixupFirstLefts2

*
open
None
1
2016-12-06
2016-03-02
Anonymous
No

I found a bug in the clipper cpp code, that I have fixed. Thought I would notify upstream

https://github.com/mapnik/clipper/commit/b82601d67830a84179888360e3dea645c1125a26

Thanks,

Blake Thompson

Discussion

  • Alessandro Ranellucci

    FixupFirstLefts3() contains another potential bug. The firstLeft variable is not used. I'm not sure how to fix it.

    void Clipper::FixupFirstLefts3(OutRec* OldOutRec, OutRec* NewOutRec)
    {
      //reassigns FirstLeft WITHOUT testing if NewOutRec contains the polygon
      for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
      {
        OutRec* outRec = m_PolyOuts[i];
        OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);
        if (outRec->Pts && outRec->FirstLeft == OldOutRec)
          outRec->FirstLeft = NewOutRec;
      }
    }
    
     
  • Angus Johnson

    Angus Johnson - 2016-12-04

    Thanks Alessandro.
    A minor bug affecting the CPP and C# code.
    Now fixed in revision 498.

     
  • Alessandro Ranellucci

    Thank you Angus. Nice to see you're around. I hope you are in good health.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB