mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-28 17:15:13 +02:00
Corrected an error causing weird and undefined behavior when
extracting substrate regions, due to failure to clean up the tagged tiles after exiting a search due to finding a substrate type that was not the global substrate.
This commit is contained in:
+6
-1
@@ -127,7 +127,11 @@ extHierSubstrate(ha, use, x, y)
|
||||
|
||||
/* Find the child's substrate node */
|
||||
nodeList = extFindNodes(use->cu_def, (Rect *) NULL, TRUE);
|
||||
if (nodeList == NULL) return;
|
||||
if (nodeList == NULL)
|
||||
{
|
||||
ExtResetTiles(use->cu_def, extUnInit);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if the child's substrate node is covered by any substrate */
|
||||
/* shield type (e.g., deep nwell). This is a stupid-simple check */
|
||||
@@ -161,6 +165,7 @@ extHierSubstrate(ha, use, x, y)
|
||||
extHierSubShieldFunc, (ClientData)NULL) != 0)
|
||||
{
|
||||
freeMagic(nodeList);
|
||||
ExtResetTiles(use->cu_def, extUnInit);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user