mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 05:47:42 +02:00
findsubname(), explicit break out of the loop
This commit is contained in:
@@ -169,13 +169,16 @@ findsubname(dico_t *dico, SPICE_DSTRINGPTR dstr_p)
|
|||||||
int nest = 1;
|
int nest = 1;
|
||||||
p--;
|
p--;
|
||||||
|
|
||||||
while ((nest > 0) && (p > s)) {
|
while (p > s) {
|
||||||
if (p[-1] == '{')
|
if (p[-1] == '{')
|
||||||
nest--;
|
nest--;
|
||||||
else if (p[-1] == '}')
|
else if (p[-1] == '}')
|
||||||
nest++;
|
nest++;
|
||||||
|
|
||||||
p--;
|
p--;
|
||||||
|
if (nest <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
p_end = p; /* p_end points to '{' */
|
p_end = p; /* p_end points to '{' */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user