summarylogtreecommitdiffstats
path: root/0001-Fix-non-terminating-loop-conditions-when-len-1.patch
diff options
context:
space:
mode:
authorAntonio Rojas2020-05-01 18:15:28 +0000
committerAntonio Rojas2020-05-01 18:15:28 +0000
commit727f591df9e7900ed3ff91bc63860d957d578905 (patch)
tree5694027fc283c38e2be83505bb235017777fb34e /0001-Fix-non-terminating-loop-conditions-when-len-1.patch
downloadaur-727f591df9e7900ed3ff91bc63860d957d578905.tar.gz
Dropped from repos
Diffstat (limited to '0001-Fix-non-terminating-loop-conditions-when-len-1.patch')
-rw-r--r--0001-Fix-non-terminating-loop-conditions-when-len-1.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/0001-Fix-non-terminating-loop-conditions-when-len-1.patch b/0001-Fix-non-terminating-loop-conditions-when-len-1.patch
new file mode 100644
index 000000000000..eaf0467fb846
--- /dev/null
+++ b/0001-Fix-non-terminating-loop-conditions-when-len-1.patch
@@ -0,0 +1,81 @@
+From efd33aad5e69f36ab343b1f28839a55db4538104 Mon Sep 17 00:00:00 2001
+From: Tom Hughes <tom@compton.nu>
+Date: Sun, 19 May 2013 10:55:37 +0100
+Subject: [PATCH 01/15] Fix non-terminating loop conditions when len=1
+
+- while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
++ while(abs(sx - lp.x1) + abs(sy - lp.y1) > 1 + lp2.len)
+ {
+ sx = (lp.x1 + sx) >> 1;
+ sy = (lp.y1 + sy) >> 1;
+ }
+---
+ include/agg_renderer_outline_aa.h | 8 ++++----
+ include/agg_renderer_outline_image.h | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/include/agg_renderer_outline_aa.h b/include/agg_renderer_outline_aa.h
+index ce25a2e..cb2aa00 100644
+--- a/include/agg_renderer_outline_aa.h
++++ b/include/agg_renderer_outline_aa.h
+@@ -1659,7 +1659,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
++ while(abs(sx - lp.x1) + abs(sy - lp.y1) > 1 + lp2.len)
+ {
+ sx = (lp.x1 + sx) >> 1;
+ sy = (lp.y1 + sy) >> 1;
+@@ -1726,7 +1726,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(ex - lp.x2) + abs(ey - lp.y2) > lp2.len)
++ while(abs(ex - lp.x2) + abs(ey - lp.y2) > 1 + lp2.len)
+ {
+ ex = (lp.x2 + ex) >> 1;
+ ey = (lp.y2 + ey) >> 1;
+@@ -1798,7 +1798,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
++ while(abs(sx - lp.x1) + abs(sy - lp.y1) > 1 + lp2.len)
+ {
+ sx = (lp.x1 + sx) >> 1;
+ sy = (lp.y1 + sy) >> 1;
+@@ -1811,7 +1811,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(ex - lp.x2) + abs(ey - lp.y2) > lp2.len)
++ while(abs(ex - lp.x2) + abs(ey - lp.y2) > 1 + lp2.len)
+ {
+ ex = (lp.x2 + ex) >> 1;
+ ey = (lp.y2 + ey) >> 1;
+diff --git a/include/agg_renderer_outline_image.h b/include/agg_renderer_outline_image.h
+index fbfac10..66d2b9a 100644
+--- a/include/agg_renderer_outline_image.h
++++ b/include/agg_renderer_outline_image.h
+@@ -969,7 +969,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
++ while(abs(sx - lp.x1) + abs(sy - lp.y1) > 1 + lp2.len)
+ {
+ sx = (lp.x1 + sx) >> 1;
+ sy = (lp.y1 + sy) >> 1;
+@@ -982,7 +982,7 @@ namespace agg
+ }
+ else
+ {
+- while(abs(ex - lp.x2) + abs(ey - lp.y2) > lp2.len)
++ while(abs(ex - lp.x2) + abs(ey - lp.y2) > 1 + lp2.len)
+ {
+ ex = (lp.x2 + ex) >> 1;
+ ey = (lp.y2 + ey) >> 1;
+--
+1.8.1.4
+