Don't send the empty line to create_circbyline(),
it is not used anymore and may cause a crash
This commit is contained in:
parent
c8c58b9f5b
commit
ce69e8d70c
|
|
@ -980,6 +980,9 @@ int ngSpice_Circ(char** circa){
|
||||||
while (circa[entries]) {
|
while (circa[entries]) {
|
||||||
entries++;
|
entries++;
|
||||||
}
|
}
|
||||||
|
entries--; /* don't send the empty line */
|
||||||
|
if (ft_ngdebug)
|
||||||
|
fprintf(stdout, "\nngspiceCirc: received netlist array with %d entries\n", entries);
|
||||||
/* create a local copy (to be freed in inpcom.c) */
|
/* create a local copy (to be freed in inpcom.c) */
|
||||||
for (i = 0; i < entries; i++) {
|
for (i = 0; i < entries; i++) {
|
||||||
newline = copy(circa[i]);
|
newline = copy(circa[i]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue