summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-10-05 10:07:34 +0000
committerrodri <rgl@antares-labs.eu>2024-10-05 10:07:34 +0000
commita09cfff78a96a10169a30324b75554827945fed4 (patch)
treec5df96a71fc78492aecc6a51ef928e437ac828f0 /render.c
parent91dfb6853d7b6d7ae49f54488b89e0eb73b5ff01 (diff)
downloadlibgraphics-a09cfff78a96a10169a30324b75554827945fed4.tar.gz
libgraphics-a09cfff78a96a10169a30324b75554827945fed4.tar.bz2
libgraphics-a09cfff78a96a10169a30324b75554827945fed4.zip
patch a leak in rectclipline. fix a pixel-discarding logic statement.
Diffstat (limited to 'render.c')
-rw-r--r--render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/render.c b/render.c
index 400593d..5d0954b 100644
--- a/render.c
+++ b/render.c
@@ -260,8 +260,8 @@ rasterize(Rastertask *task)
z = flerp(prim->v[0].p.z, prim->v[1].p.z, perc);
/* TODO get rid of the bounds check and make sure the clipping doesn't overflow */
- if((ropts & RODepth) &&
- !ptinrect(p, params->fb->r) || z <= getdepth(zr, p))
+ if(!ptinrect(p, params->fb->r) ||
+ ((ropts & RODepth) && z <= getdepth(zr, p)))
goto discard;
/* interpolate z⁻¹ and get actual z */