From 3d4b3ad9140ba97c143be0e364a2ec7b01de29fc Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 1 Jun 2022 04:54:59 +0000 Subject: [PATCH] Found another place where a bounds check on the clip area was not done (at all), again resulting in negative capacitances. --- extract/ExtBasic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 532d6e6a..61d6e63d 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -4017,6 +4017,10 @@ extNodeAreaFunc(tile, arg) { TITORECT(tile, &r); GEOCLIP(&r, extNodeClipArea); + + /* Check if the tile is outside the clip area */ + if ((r.r_xtop <= r.r_xbot) || (r.r_ytop < r.r_ybot)) continue; + area = (dlong)(r.r_xtop - r.r_xbot) * (dlong)(r.r_ytop - r.r_ybot); } else area = (dlong)(TOP(tile) - BOTTOM(tile)) * (dlong)(RIGHT(tile) - LEFT(tile));