]> granicus.if.org Git - graphviz/commitdiff
fix incorrect return value in inside_polygon
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Jun 2021 01:18:06 +0000 (18:18 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Jun 2021 16:14:14 +0000 (09:14 -0700)
A refactor in 7731b18f403b545ea6eca99f429dd9b63e0659d6 incorrectly flipped the
polarity of one of the return sites in inside_polygon. The effect of this was
confusing assertion failures. Fixes #2082.

CHANGELOG.md
lib/ortho/partition.c
rtest/test_regression.py

index 0be79cedd9fdabe05b894932457b01f341a5374a..3fbbb96a820e5c9085a68a2e665d1635c12de55b 100644 (file)
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - out of bounds read when examining a registered plugin whose name is ≥63
   characters
 - do not `fclose(NULL)` in gvmap
+- Assertion error when using `dot` in `ortho.c` in `convertSPtoRoute` in
+  graphviz 2.47.2 #2082. This was a regression introduced in 2.47.2.
 
 ## [2.47.2] - 2021-05-26
 
index fefce8a047fc1c03c16369bd00a1cd4948117970..69b1dbcfd0660152924dccb4c5adb950dc69d441 100644 (file)
@@ -181,7 +181,7 @@ inside_polygon (trap_t *t, segment_t* seg)
   if ((t->u0 <= 0 && t->u1 <= 0) || (t->d0 <= 0 && t->d1 <= 0)) /* triangle */
     return _greater_than(&seg[rseg].v1, &seg[rseg].v0);
   
-  return true;
+  return false;
 }
 
 static double
index 5dc374d4a48e9f231924b0d741e51f0461de9ae0..b134e89622130e496579260b7f0c40f92846c6ba 100644 (file)
@@ -816,7 +816,6 @@ def test_2078():
 
   assert "subgraph" in stderr.lower(), "subgraph not mentioned in error message"
 
-@pytest.mark.xfail()
 def test_2082():
   """
   Check a bug in inside_polygon has not been reintroduced.