Browse Source

inp_search_closing_paren(), rewrite, considering the assertion

pre-master-46
rlar 13 years ago
parent
commit
a683431d57
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -1790,16 +1790,16 @@ comment_out_unused_subckt_models(struct line *start_card, int no_of_lines)
static char * static char *
inp_search_closing_paren1(char *s) inp_search_closing_paren1(char *s)
{ {
int count = 1;
int count = 0;
// assert(*s == '(') // assert(*s == '(')
while (*s) { while (*s) {
s++;
if (*s == '(') if (*s == '(')
count++; count++;
if (*s == ')') if (*s == ')')
count--; count--;
if (count == 0) if (count == 0)
return s + 1; return s + 1;
s++;
} }
return NULL; return NULL;

Loading…
Cancel
Save