From 18f3c5d42963396f105641810f7aac6019107ddb Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sun, 2 Aug 2026 12:56:23 -0400 Subject: [PATCH] Corrected a crash condition report in issue #548 where somehow the tech file setup results in a residue mask for a contact that includes the contact type itself. Therefore in ResMain.c, FindStartTile() ends up calling itself with the same arguments, ensuring an infinite loop. It is easy enough to reject the recursive call if the residue type equals the original type. The question of how a contact residue mask ended up with the contact type as part of it is not addressed by this fix, and may not have any other consequences. --- resis/ResMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resis/ResMain.c b/resis/ResMain.c index b5a3268a..ebe50732 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -1717,7 +1717,7 @@ FindStartTile(resisdata, SourcePoint) TileType rtype; for (rtype = TT_TECHDEPBASE; rtype < DBNumUserLayers; rtype++) - if (TTMaskHasType(rmask, rtype)) + if (TTMaskHasType(rmask, rtype) && (rtype != savtype)) { resisdata->rg_ttype = rtype; if ((tile = FindStartTile(resisdata, SourcePoint)) != NULL)