I have located the bug in the IF statement which causes application to go SEG FAULT. Any advices on how to modify it, so it would work good?Code:static char *list_parse_switch(char *l,char *o,struct options *s) { char *nx = list_parse_item(l); int i; l = strltrim(l); for (i=0;i<s->n;i++) { debug("%s %s\n",s->opts[i],l); if (strncmp(l,s->opts[i],strlen(s->opts[i]))==0) { *o = i+1; return(nx); } } return(NULL); }
Thanks in advance...