Added a check for exts_globSubstratePlane == -1 in ExtBasic.c,

because this is the default value used if no substrate types are
declared in the tech file;  and if so, this would cause an out-
of-bounds check.  See Issue #523 on github from Darryl Miles.
This commit is contained in:
R. Timothy Edwards 2026-06-09 17:41:28 -04:00
parent 295ec7e492
commit a38fa29dac
1 changed files with 1 additions and 1 deletions

View File

@ -5130,7 +5130,7 @@ extFindNodes(def, clipArea, subonly)
pNum = ExtCurStyle->exts_globSubstratePlane;
/* Does the type set of this plane intersect the substrate types? */
if (TTMaskIntersect(&DBPlaneTypes[pNum], &subsTypesNonSpace))
if ((pNum != -1) && TTMaskIntersect(&DBPlaneTypes[pNum], &subsTypesNonSpace))
{
arg.fra_pNum = pNum;
DBSrPaintClient((Tile *) NULL, def->cd_planes[pNum],