]> granicus.if.org Git - graphviz/commitdiff
small fudge needed to prevent livelocks on 32 bit machines
authorellson <devnull@localhost>
Tue, 16 Sep 2008 19:10:20 +0000 (19:10 +0000)
committerellson <devnull@localhost>
Tue, 16 Sep 2008 19:10:20 +0000 (19:10 +0000)
lib/common/routespl.c

index daba38827ed1048874fa8d981320b29ad94ccdcf..145d0af63d86868825985bf646028c524f250446 100644 (file)
@@ -489,7 +489,10 @@ REDO:
            sp[0].x = sp[0].x + t * (sp[1].x - sp[0].x);
            sp[0].y = sp[0].y + t * (sp[1].y - sp[0].y);
            for (bi = 0; bi < boxn; bi++) {
-               if (sp[0].y <= boxes[bi].UR.y && sp[0].y >= boxes[bi].LL.y) {
+/* this tested ok on 64bit machines, but on 32bit we need this FUDGE
+ *     or graphs/directed/records.gv fails */
+#define FUDGE .0001
+               if (sp[0].y <= boxes[bi].UR.y+FUDGE && sp[0].y >= boxes[bi].LL.y-FUDGE) {
                    if (boxes[bi].LL.x > sp[0].x)
                        boxes[bi].LL.x = sp[0].x;
                    if (boxes[bi].UR.x < sp[0].x)