mirror of https://github.com/CGAL/cgal
bugfix for vertex conflict (pqt)
The pnt_on_seg variable was used uninitialized in some cases. Here is a previously problematic input that now works fine: $ cat ~/code/geom/demo/Segment_Delaunay_graph_Linf_2/2a2across.cin s -150 -50 150 50 s -50 100 50 -100
This commit is contained in:
parent
9a4ea3c933
commit
d2ccbc59c3
|
|
@ -1121,6 +1121,7 @@ private:
|
|||
|
||||
if (is_same_qsrc_p or is_same_qtrg_p) {
|
||||
std::cout << "debug: pss: p is endpoint of q" << std::endl;
|
||||
pnt_on_seg = pnt;
|
||||
Point_2 otherpnt;
|
||||
if (is_same_qsrc_p) {
|
||||
otherpnt = seg.target();
|
||||
|
|
@ -1143,7 +1144,6 @@ private:
|
|||
|
||||
std::cout << "debug: pss from pt to pt on seg" << std::endl;
|
||||
|
||||
Point_2 pnt_on_seg;
|
||||
if (is_positive_slope) {
|
||||
pnt_on_seg = compute_vertical_projection(l, pnt);
|
||||
lver = compute_line_from_to(pnt, pnt_on_seg);
|
||||
|
|
@ -1227,6 +1227,9 @@ private:
|
|||
|
||||
// here p and t have common endpoint testt
|
||||
|
||||
std::cout << "debug testt=" << testt
|
||||
<< " pnt_on_seg=" << pnt_on_seg << std::endl;
|
||||
|
||||
// check if testp equals pnt_on_seg
|
||||
|
||||
if ((cmpx(testt, pnt_on_seg) == EQUAL ) and
|
||||
|
|
|
|||
Loading…
Reference in New Issue