From a015b7f8ebe38b671d47440e8b2371aa2e8d4cd9 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 17 Oct 2020 12:43:22 -0400 Subject: [PATCH] Corrected a problem in which extraction of MOS caps (or any device with two or more terminals other than the device identifier type tied together) would fail if there were not a device record specifically matching a one-S/D-terminal device. This is inconsistent with past behavior, and so has been fixed. --- extract/ExtBasic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 17b41ae0..b273c5ab 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -1726,9 +1726,15 @@ extOutputDevices(def, transList, outFile) tmask = &devptr->exts_deviceSDTypes[termcount]; if (TTMaskIsZero(tmask)) { if (termcount < nsd) { + ExtDevice *devcheck; /* See if there is another matching device record with */ /* a different number of terminals, and try again. */ - devptr = extDevFindMatch(devptr, t); + devcheck = extDevFindMatch(devptr, t); + if (devcheck != NULL) devptr = devcheck; + + /* Not finding another device record just means that */ + /* terminals are tied together on the same net, such as */ + /* with a MOS cap. Accept this fact and move on. */ } break; /* End of SD terminals */ }