diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2014-07-16 18:00:19 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-08-03 16:34:16 +0700 |
commit | e28787e9e05fc37a6b194ebf62ad5bc647190596 (patch) | |
tree | ad51d84194c2656f61b59428b08fc6b11940e02d /libraries/agg/patches/0001-Fix-non-terminating-loop-conditions-when-len-1.patch | |
parent | 6fd855630e6d1862995a200f5a07d9ade9190286 (diff) |
libraries/agg: Added patches from fedora.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/agg/patches/0001-Fix-non-terminating-loop-conditions-when-len-1.patch')
-rw-r--r-- | libraries/agg/patches/0001-Fix-non-terminating-loop-conditions-when-len-1.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/libraries/agg/patches/0001-Fix-non-terminating-loop-conditions-when-len-1.patch b/libraries/agg/patches/0001-Fix-non-terminating-loop-conditions-when-len-1.patch new file mode 100644 index 0000000000000..eaf0467fb8462 --- /dev/null +++ b/libraries/agg/patches/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 + |