From 6fd12437f05f067fefd1f610afc63ab09dafe698 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 25 Sep 2023 20:39:31 +0800 Subject: [PATCH] p->n_diodes --- ses_step_topo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ses_step_topo.c b/ses_step_topo.c index 980ac09..6d04e6c 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -5,6 +5,12 @@ int _ses_path_cmp(const void* v0, const void* v1) const ses_path_t* p0 = *(const ses_path_t**)v0; const ses_path_t* p1 = *(const ses_path_t**)v1; + if (p0->n_diodes > p1->n_diodes) + return -1; + + if (p0->n_diodes < p1->n_diodes) + return 1; + if (p0->pins->size > p1->pins->size) return -1; -- 2.25.1