From 4f315d33d6c9084f3f70a15a01b653c43ce87d5d Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sun, 9 Mar 2025 11:07:58 -0400 Subject: [PATCH] Fixed a corner case found by Sylvain Munaut (see github issue tracker #96) in which a subcircuit with only one port (in this case, a pad) but which has properties (in this case, "M") will fail to set the pointer position ahead of the property because the loop starts after the first pin, so it has already missed the position that needs to be saved. Fixed by initializing the value to the first pin position before starting the loop. --- VERSION | 2 +- base/netcmp.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d8f6f88..d8d0e78 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.292 +1.5.293 diff --git a/base/netcmp.c b/base/netcmp.c index 23fe3ee..c00e634 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -6055,6 +6055,9 @@ PropertyMatch(struct Element *E1, struct Element *E2, #endif } + obn1 = ob1->next; + obn2 = ob2->next; + /* Find the first property record of each circuit. obn1, obn2 are */ /* the last device record before the properties for each device. */ for (tp1 = ob1->next; (tp1 != NULL) && tp1->type > FIRSTPIN; tp1 = tp1->next)