mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 01:43:00 +02:00
Corrected a failure to check for an invalid layer in the routine
that queries a default layer width. Otherwise this can cause a segfault, especially when a technology file has not been specified and the minimum tech is in effect.
This commit is contained in:
@@ -4153,6 +4153,12 @@ DRCGetDefaultLayerWidth(ttype)
|
||||
DRCCookie *cptr;
|
||||
TileTypeBitMask *set;
|
||||
|
||||
if (ttype < 0)
|
||||
{
|
||||
TxError("Error: Attempt to get default width of invalid layer!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (cptr = DRCCurStyle->DRCRulesTbl[TT_SPACE][ttype]; cptr != (DRCCookie *) NULL;
|
||||
cptr = cptr->drcc_next)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user