From f0cead24b80fb0ce78e7b605f5dd9e9b2d586218 Mon Sep 17 00:00:00 2001 From: rlar Date: Wed, 22 Nov 2017 22:48:38 +0100 Subject: [PATCH] findsubname(), duplicate function epilogue and return early --- src/frontend/numparam/spicenum.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 675a0ed62..852efc134 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -204,6 +204,11 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p) } entry = entrynb(dico, spice_dstring_value(&name)); found = entry && (entry->tp == NUPA_SUBCKT); + if (found) { + if (found && (h < ls)) + pscopy(dstr_p, s, 0, h); + return; + } } }