diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2023-04-26 11:22:47 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2023-04-26 11:22:47 +0100 |
commit | 3780f5d7c4e2f4a84d54b47d9555060301985e5f (patch) | |
tree | a8ed3dbbb1a982363c103d2e74e2e998129ac332 | |
parent | 0e5825a5332ab76bd17ef5c6a0f577f4debef4cc (diff) | |
download | ghostpdl-3780f5d7c4e2f4a84d54b47d9555060301985e5f.tar.gz |
Bug 706632: Fix infinite loop in shading code.
Another set of typos in the shading optimisation code. This is a
different "class" of typo than before. I've checked the code
so that we should be free of problems of this class at least
in future.
-rw-r--r-- | base/gxshade1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/base/gxshade1.c b/base/gxshade1.c index d5776e2e0..73414cbfd 100644 --- a/base/gxshade1.c +++ b/base/gxshade1.c @@ -652,7 +652,7 @@ check_above_quarter: v1 = 1; goto check_bottom; } - else if (c[1].vertex.p.y > pfs->rect.q.y && c[2].vertex.p.y > pfs->rect.q.y) + else if (c[3].vertex.p.y > pfs->rect.q.y && c[2].vertex.p.y > pfs->rect.q.y) { /* Check 3+2 off bottom. */ v0 = 3; @@ -800,7 +800,7 @@ check_rot_above_quarter: v1 = 3; goto check_rot_bottom; } - else if (c[3].vertex.p.y > pfs->rect.q.y && c[2].vertex.p.y > pfs->rect.q.y) + else if (c[1].vertex.p.y > pfs->rect.q.y && c[2].vertex.p.y > pfs->rect.q.y) { /* Check 1+2 off the bottom. */ v0 = 1; @@ -1410,7 +1410,7 @@ check_above_quarter: v1 = 1; goto check_bottom; } - else if (cc->corners[1].y > pfs->rect.q.y && cc->corners[2].y > pfs->rect.q.y) + else if (cc->corners[3].y > pfs->rect.q.y && cc->corners[2].y > pfs->rect.q.y) { /* Check 3+2 off bottom. */ v0 = 3; @@ -1558,7 +1558,7 @@ check_rot_above_quarter: v1 = 3; goto check_rot_bottom; } - else if (cc->corners[3].y > pfs->rect.q.y && cc->corners[2].y > pfs->rect.q.y) + else if (cc->corners[1].y > pfs->rect.q.y && cc->corners[2].y > pfs->rect.q.y) { /* Check 1+2 off the bottom. */ v0 = 1; |