Leading space bug corrected.

This commit is contained in:
pnenzi 2004-02-02 13:06:59 +00:00
parent 1912d652f6
commit d0c3eaf5fe
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-02-10 Paolo Nenzi <p.nenzi@ieee.org>
* src/frontend/inpcom.c: Applied patch from Dietmar Warning
to solve the bug discovered by Jelle Haandrikman: wrong
subcircuit expansion when leading spaces are present in the
subcircuit netlist.
2004-01-28 Paolo Nenzi <p.nenzi@ieee.org>
* configure.in: changed version to rework15.

View File

@ -56,7 +56,7 @@ readline(FILE *fd)
strptr = tmalloc(memlen);
memlen -= 1; /* Save constant -1's in while loop */
while((c = getc(fd)) != EOF) {
if (strlen == 0 && c == '\n')
if (strlen == 0 && (c == '\n' || c == ' ')) /* Leading spaces away */
continue;
strptr[strlen] = c;
strlen++;