From: Nicklas Avén Date: Thu, 20 Aug 2015 20:08:02 +0000 (+0000) Subject: Fix typo causing wrong answer in 3d-calc in some situations #3251 X-Git-Tag: 2.2.0rc1~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a15c04cacb81b73e505a2028eac8e8c26b6136d5;p=postgis Fix typo causing wrong answer in 3d-calc in some situations #3251 git-svn-id: http://svn.osgeo.org/postgis/trunk@13960 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/measures3d.c b/liblwgeom/measures3d.c index 77ebeecb5..b3b67e90c 100644 --- a/liblwgeom/measures3d.c +++ b/liblwgeom/measures3d.c @@ -864,12 +864,12 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2 double a, b, c, d, e, D; /*s1p1 and s1p2 are the same point */ - if ( ( s1p1->x == s1p2->x) && (s1p1->y == s1p2->y) && (s1p1->z == s1p2->y) ) + if ( ( s1p1->x == s1p2->x) && (s1p1->y == s1p2->y) && (s1p1->z == s1p2->z) ) { return lw_dist3d_pt_seg(s1p1,s2p1,s2p2,dl); } /*s2p1 and s2p2 are the same point */ - if ( ( s2p1->x == s2p2->x) && (s2p1->y == s2p2->y) && (s2p1->z == s2p2->y) ) + if ( ( s2p1->x == s2p2->x) && (s2p1->y == s2p2->y) && (s2p1->z == s2p2->z) ) { dl->twisted= ((dl->twisted) * (-1)); return lw_dist3d_pt_seg(s2p1,s1p1,s1p2,dl);