Skip to content

Commit 8ce614b

Browse files
authored
Merge pull request #56 from vitcpp/fix-sphereline_circle_pos
Fix sphereline_circle_pos (uninitialized memory use)
2 parents 1709fd5 + 56ff366 commit 8ce614b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: expected/overlaps.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -835,14 +835,14 @@ select 'sbox && scircle', 'f' as expected, sbox'((0d , 0d), (20d , 20d))' && sci
835835
select 'sbox && scircle', 'f' as expected, sbox'((0d , 0d), (0d , 0d))' && scircle'<(10d , 0d) , 10d>' as actual;
836836
?column? | expected | actual
837837
-----------------+----------+--------
838-
sbox && scircle | f | f
838+
sbox && scircle | f | t
839839
(1 row)
840840

841841
-- the box degenerated into the point lies in the interior of circle
842842
select 'sbox && scircle', 'f' as expected, sbox'((0d , 0d), (0d , 0d))' && scircle'<(0d , 0d) , 10d>' as actual;
843843
?column? | expected | actual
844844
-----------------+----------+--------
845-
sbox && scircle | f | f
845+
sbox && scircle | f | t
846846
(1 row)
847847

848848
-- the box and circle are degenerated into the point and coincide

Diff for: src/line.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ sphereline_circle_pos(const SLine *sl, const SCIRCLE *sc)
349349
{
350350
/* line is point */
351351
sline_begin(&p[0], sl);
352-
if (spoint_in_circle(&p[0], &c))
352+
if (spoint_in_circle(&p[0], sc))
353353
{
354354
return PGS_CIRCLE_CONT_LINE;
355355
}

0 commit comments

Comments
 (0)