]> granicus.if.org Git - graphviz/commitdiff
dotgen make_flat_adj_edges: fix truncation to int during intermediate calculations
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 18 Aug 2022 02:38:58 +0000 (19:38 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 23 Aug 2022 04:38:16 +0000 (21:38 -0700)
Like the prior commits, the problem fixed in this commit seems to have been a
mistake in ebd6191b0eec6e23d96c92aaa06212de339207e3 in not updating these
variables to doubles when transitioning to double-based points. Squashes 4
-Wfloat-conversion warnings.

lib/dotgen/dotsplines.c

index a8f6027ec175e85db40385a051731bfe98f8a4f9..77f8297608d5c51d0deae3ad8b94b917e0ac8c62 100644 (file)
@@ -1279,7 +1279,8 @@ make_flat_adj_edges(graph_t* g, edge_t** edges, int ind, int cnt, edge_t* e0,
     graph_t* subg;
     node_t *auxt, *auxh;
     edge_t* auxe;
-    int     i, j, midx, midy, leftx, rightx;
+    int     i, j;
+    double midx, midy, leftx, rightx;
     pointf   del;
     edge_t* hvye = NULL;
     attr_state_t* attrs;