From a683431d574ae6d51638bf8db8684b288b2332e4 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 3 Oct 2013 11:54:58 +0200 Subject: [PATCH] inp_search_closing_paren(), rewrite, considering the assertion --- src/frontend/inpcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 2349d28ff..509f872d6 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1790,16 +1790,16 @@ comment_out_unused_subckt_models(struct line *start_card, int no_of_lines) static char * inp_search_closing_paren1(char *s) { - int count = 1; + int count = 0; // assert(*s == '(') while (*s) { - s++; if (*s == '(') count++; if (*s == ')') count--; if (count == 0) return s + 1; + s++; } return NULL;